summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/winsup.h
diff options
context:
space:
mode:
authorRobert Collins <rbtcollins@hotmail.com>2003-11-14 23:40:06 +0000
committerRobert Collins <rbtcollins@hotmail.com>2003-11-14 23:40:06 +0000
commit95d02d5b9be998c93ffb23085ebd5b2ba263463a (patch)
tree2081f00a0190ca76c33f1bc026dbc8f4c7141404 /winsup/cygwin/winsup.h
parent508682370b4aad954555e5611c994eb96fb5cc56 (diff)
downloadcygnal-95d02d5b9be998c93ffb23085ebd5b2ba263463a.tar.gz
cygnal-95d02d5b9be998c93ffb23085ebd5b2ba263463a.tar.bz2
cygnal-95d02d5b9be998c93ffb23085ebd5b2ba263463a.zip
2003-11-11 Robert Collins <rbtcollins@hotmail.com>
Ron Parker <rdparker@butlermfg.com> * bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH. * cygheap.h: Ditto. * dcrt0.cc: Ditto. * delqueue.cc: Ditto. * dlfcn.cc: Ditto. * dll_init.cc: Ditto. * dll_init.h: Ditto. * dtable.cc: Ditto. * environ.cc: Ditto. * environ.h: Ditto. * exceptions.cc: Ditto. * external.cc: Ditto. * fhandler_disk_file.cc: Ditto. * fhandler_proc.cc: Ditto. * fhandler_process.cc: Ditto. * fhandler_raw.cc: Ditto. * fhandler_registry.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_virtual.cc: Ditto. * miscfuncs.cc: Ditto. * mmap.cc: Ditto. * netdb.cc: Ditto. * path.cc: Ditto. * path.h: Ditto. * pinfo.cc: Ditto. * pinfo.h: Ditto. * pthread.cc: Ditto. * registry.cc: Ditto. * shared.cc: Ditto. * shared_info.h: Ditto. * smallprint.c: Ditto. * spawn.cc: Ditto. * strace.cc: Ditto. * syscalls.cc: Ditto. * thread.h: Ditto. * uinfo.cc: Ditto. * winsup.h: Ditto. * include/limits.h: Ditto. * include/cygwin/config.h: Ditto. * include/sys/param.h: Ditto.
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r--winsup/cygwin/winsup.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index adaa6a33b..9d6539898 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -55,6 +55,23 @@ extern unsigned long cygwin_inet_addr (const char *cp);
}
#endif
+/* Note that MAX_PATH is defined in the windows headers */
+/* There is also PATH_MAX and MAXPATHLEN.
+ PATH_MAX is from Posix and does *not* include the trailing NUL.
+ MAXPATHLEN is from Unix.
+
+ Thou shalt use CYG_MAX_PATH throughout. It avoids the NUL vs no-NUL
+ issue and is neither of the Unixy ones [so we can punt on which
+ one is the right one to use].
+
+ Windows ANSI calls are limited to MAX_PATH in length. Cygwin calls that
+ thunk through to Windows Wide calls are limited to 32K. We define
+ CYG_MAX_PATH as a convenient, not to short, not too long 'happy medium'.
+
+ */
+
+#define CYG_MAX_PATH (MAX_PATH)
+
#ifdef __cplusplus
extern const char case_folded_lower[];
@@ -306,14 +323,6 @@ extern SYSTEM_INFO system_info;
#define WM_ASYNCIO 0x8000 // WM_APP
-/* Note that MAX_PATH is defined in the windows headers */
-/* There is also PATH_MAX and MAXPATHLEN.
- PATH_MAX is from Posix and does *not* include the trailing NUL.
- MAXPATHLEN is from Unix.
-
- Thou shalt use MAX_PATH throughout. It avoids the NUL vs no-NUL
- issue and is neither of the Unixy ones [so we can punt on which
- one is the right one to use]. */
#define STD_RBITS (S_IRUSR | S_IRGRP | S_IROTH)
#define STD_WBITS (S_IWUSR)