diff src/s/sol2.h @ 74:54cc21c15cbb r20-0b32

Import from CVS: tag r20-0b32
author cvs
date Mon, 13 Aug 2007 09:04:33 +0200
parents 131b0175ea99
children 0d2f883870bc
line wrap: on
line diff
--- a/src/s/sol2.h	Mon Aug 13 09:03:47 2007 +0200
+++ b/src/s/sol2.h	Mon Aug 13 09:04:33 2007 +0200
@@ -1,5 +1,6 @@
 /* Synched up with: FSF 19.31. */
 
+#define __EXTENSIONS__
 #include "usg5-4-2.h"		/* XEmacs change from 5-4 to 5-4-2 */
 
 #define SOLARIS2
@@ -42,6 +43,16 @@
    there isn't a prototype for it other than in /usr/ucbinclude. */
 int gethostname (char *, int);
 
+/* Get non-ANSI functions from ANSI header files in cc -Xc mode.
+   Sun has promised to fix setjmp.h */
+#if __STDC__ == 1
+#ifndef __GNUC__
+#define _POSIX_C_SOURCE 1
+#include <setjmp.h>
+#undef _POSIX_C_SOURCE
+#endif /* __GNUC__ */
+#endif /* __STDC__ */
+
 /* XEmacs: Solaris include files miss this. */
 struct timeval;
 int utimes (char *file, struct timeval *tvp);
@@ -49,7 +60,7 @@
 /* XEmacs addition: to this to avoid having problems when we later
    define INT_MAX etc. */
 #include <limits.h>
-#endif
+#endif /* C_CODE */
 
 /* XEmacs change -- removed flags to force K & R compilation */