Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
+#ifdef DEBUGIT
+#define spf(a, b, c) small_printf (a, b, c)
+#else
+#define spf(a, b, c) do {} while (0)
+#endif
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
}
#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[];
})
/* Convert a signal to a signal mask */
-#define SIGTOMASK(sig) (1<<((sig) - signal_shift_subtract))
+#define SIGTOMASK(sig) (1 << ((sig) - signal_shift_subtract))
extern unsigned int signal_shift_subtract;
#ifdef NEW_MACRO_VARARGS
-# define api_fatal(...) __api_fatal ("%P: *** " __VA_ARGS__)
+# define api_fatal(...) __api_fatal (__VA_ARGS__)
#else
# define api_fatal(fmt, args...) __api_fatal ("%P: *** " fmt,## args)
#endif
__check_null_invalid_struct ((s), sizeof (*(s)))
#define check_null_invalid_struct_errno(s) \
__check_null_invalid_struct_errno ((s), sizeof (*(s)))
+#define check_invalid_read_struct_errno(s) \
+ __check_invalid_read_ptr_errno ((s), sizeof (*(s)))
struct iovec;
ssize_t check_iovec_for_read (const struct iovec *, int) __attribute__ ((regparm(2)));
__attribute__ ((regparm (3)));
class path_conv;
-int access_worker (path_conv&, int) __attribute__ ((regparm (2)));
+int access_worker (path_conv&, int, class fhandler_base * = NULL) __attribute__ ((regparm (3)));
+
+int fcntl_worker (int fd, int cmd, void *arg);
extern "C" int low_priority_sleep (DWORD) __attribute__ ((regparm (1)));
#define SLEEP_0_STAY_LOW INFINITE
+size_t getshmlba (void);
+
/**************************** Exports ******************************/
extern "C" {
#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)
extern HANDLE hMainProc;
extern bool cygwin_testing;
-extern unsigned _cygwin_testing_magic;
-extern HMODULE cygwin_hmodule;
extern char almost_null[];