# HG changeset patch # User stephent # Date 1052473842 0 # Node ID e5da225ea2ca1154eb2d0fc83097e446f758014c # Parent 88a2f43560bfacd3a78f579d5f1f06b7ea81ff2e [xemacs-hg @ 2003-05-09 09:50:40 by stephent] #define stat workaround <87r878ihhf.fsf@tleepslib.sk.tsukuba.ac.jp> diff -r 88a2f43560bf -r e5da225ea2ca src/ChangeLog --- a/src/ChangeLog Fri May 09 01:41:56 2003 +0000 +++ b/src/ChangeLog Fri May 09 09:50:42 2003 +0000 @@ -1,3 +1,23 @@ +2003-05-09 Stephen J. Turnbull + + Various cleanups against the possibility that does + #define stat ... . + + * lisp.h: Remove struct stat declaration. + +2003-05-06 Stephen J. Turnbull + + * broken-sun.h: Warn about possibility of #define stat. + +2000-07-22 Ilya N. Golubev + + * lisp.h (filemodestring): Remove + + * sysfile.h (filemodestring): Put it here + + * filemode.c (filemodestring): Note in comment where it is + declared. + 2003-05-09 Martin Buchholz * dumper.c (pdump_load): Pdump'ed XEmacs can't find its .dmp file. @@ -9,7 +29,7 @@ * database.c: Berkeley DB wants __STDC__ to be defined. -2003-05-04 Martin Buchholz +2003-04-05 Martin Buchholz * EmacsFrameP.h (EmacsFramePart): Kludge to allow compiling with Motif1, but linking with Motif2. diff -r 88a2f43560bf -r e5da225ea2ca src/filemode.c --- a/src/filemode.c Fri May 09 01:41:56 2003 +0000 +++ b/src/filemode.c Fri May 09 09:50:42 2003 +0000 @@ -30,7 +30,9 @@ static void rwx (unsigned short bits, char *chars); static void setst (unsigned short bits, char *chars); -/* filemodestring - fill in string STR with an ls-style ASCII +/* declared in "sysfile.h" + + filemodestring - fill in string STR with an ls-style ASCII representation of the st_mode field of file stats block STATP. 10 characters are stored in STR; no terminating null is added. The characters stored in STR are: diff -r 88a2f43560bf -r e5da225ea2ca src/lisp.h --- a/src/lisp.h Fri May 09 01:41:56 2003 +0000 +++ b/src/lisp.h Fri May 09 09:50:42 2003 +0000 @@ -1405,7 +1405,6 @@ struct extent; struct frame; /* "frame.h" */ struct window; /* "window.h" */ -struct stat; /* */ struct utimbuf; /* "systime.h" or */ struct display_line; struct display_glyph_area; @@ -4283,9 +4282,6 @@ void unlock_all_files (void); void unlock_buffer (struct buffer *); -/* Defined in filemode.c */ -void filemodestring (struct stat *, char *); - /* Defined in floatfns.c */ EXFUN (Ftruncate, 1); diff -r 88a2f43560bf -r e5da225ea2ca src/sysfile.h --- a/src/sysfile.h Fri May 09 01:41:56 2003 +0000 +++ b/src/sysfile.h Fri May 09 09:50:42 2003 +0000 @@ -58,6 +58,9 @@ # include #endif +/* Some systems (SCO 3.2v5) do #define stat ... in this header. So it + _must_ be included before any use of struct stat. Most emacs files + should include sysfile.h. The unex*.c include directly. */ #include #ifdef WIN32_ANY @@ -368,6 +371,11 @@ int qxe_unlink (const Ibyte *path); +/* definition in filemode.c + must be declared here to ensure that struct stat is properly formed + on systems like SCO 3.2v5 */ +void filemodestring (struct stat *, char *); + #endif /* emacs */ @@ -478,5 +486,4 @@ #endif /* emacs */ - #endif /* INCLUDED_sysfile_h_ */