diff src/sysfile.h @ 4854:95c4ced5c07c

fix compile problems -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-01-14 Ben Wing <ben@xemacs.org> * glyphs-eimage.c: Turn on fixes for conflicts between jmorecfg.h and windows.h on Cygwin, too. * emacs.c (debug_can_access_memory): * lisp.h: Declare function const void * to avoid warnings. * sysfile.h: Include syswindows.h on Windows to avoid problems using things like PATHNAME_CONVERT_OUT. * sysfile.h (X_OK): * dialog-msw.c (handle_directory_proc): * dialog-msw.c (handle_directory_dialog_box): * nt.c (Fmswindows_short_file_name): * sysdep.c (qxe_allocating_getcwd): * syswindows.h (LOCAL_FILE_FORMAT_TO_TSTR): * unexcw.c (unexec): * unexnt.c (_start): * win32.c (mswindows_read_link_1): Rename PATH_MAX_EXTERNAL to PATH_MAX_TSTR to reflect its actual semantics. * unexcw.c: Remove include of syswindows.h that had been added because sysfile.h didn't include it.
author Ben Wing <ben@xemacs.org>
date Thu, 14 Jan 2010 01:25:16 -0600
parents b3ea9c582280
children 5ab6dc5d789e
line wrap: on
line diff
--- a/src/sysfile.h	Wed Jan 13 19:43:16 2010 -0600
+++ b/src/sysfile.h	Thu Jan 14 01:25:16 2010 -0600
@@ -86,6 +86,12 @@
 /* # include <sys/fcntl.h> */
 #endif /* WIN32_NATIVE */
 
+/* Needed for C_STRING_TO_TSTR, MAX_XETCHAR_SIZE below; but syswindows.h
+   depends on lisp.h being previously included. */
+#if defined (WIN32_ANY) && defined (emacs)
+# include "syswindows.h"
+#endif
+
 #ifndef	STDERR_FILENO
 #define	STDIN_FILENO	0
 #define	STDOUT_FILENO	1
@@ -302,14 +308,16 @@
 # define QXE_PATH_MAX 1024
 #endif
 
-/* Client .c files should use PATH_MAX_INTERNAL or PATH_MAX_EXTERNAL
+/* Client .c files should use PATH_MAX_INTERNAL or PATH_MAX_TCHAR
    if they must use either one at all. */
 
 /* Use for internally formatted text, which can potentially have up to
    four bytes per character */
 #define PATH_MAX_INTERNAL (QXE_PATH_MAX * MAX_ICHAR_LEN)
-/* Use for externally formatted text. */
-#define PATH_MAX_EXTERNAL (QXE_PATH_MAX * MAX_XETCHAR_SIZE)
+#ifdef WIN32_ANY
+/* Use for externally formatted text in TCHAR's. */
+#define PATH_MAX_TCHAR (QXE_PATH_MAX * MAX_XETCHAR_SIZE)
+#endif
 
 /* The following definitions are needed under Windows, at least */
 #ifndef X_OK