from scratch, add Berkeley copyright; change to be included by a.out.h
[unix-history] / usr / src / include / setjmp.h
index 22d9d60..d2c2f13 100644 (file)
@@ -4,11 +4,11 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)setjmp.h    5.2 (Berkeley) %G%
+ *     @(#)setjmp.h    5.4 (Berkeley) %G%
  */
 
  */
 
-#ifndef _SETJMP_
-#define _SETJMP_
+#ifndef _SETJMP_H_
+#define _SETJMP_H_
 
 #ifdef hp300
 #define _JBLEN 17
 
 #ifdef hp300
 #define _JBLEN 17
 #define _JBLEN 10
 #endif
 
 #define _JBLEN 10
 #endif
 
+#ifndef _ANSI_SOURCE
 /*
 /*
- * sigsetjmp/siglongjmp use the first int to decide if the
- * signal mask was saved or not.
+ * WARNING: sigsetjmp() isn't supported yet, this is a placeholder.
  */
 typedef int sigjmp_buf[_JBLEN + 1];
  */
 typedef int sigjmp_buf[_JBLEN + 1];
+#endif /* not ANSI */
 
 
-#ifndef _POSIX_SOURCE
 typedef int jmp_buf[_JBLEN];
 typedef int jmp_buf[_JBLEN];
-#endif
 
 
-#if __STDC__ || c_plusplus
-int sigsetjmp(sigjmp_buf, int);
-void siglongjmp(sigjmp_buf, int);
-#ifndef _POSIX_SOURCE
-extern int setjmp(jmp_buf);
-extern int _setjmp(jmp_buf);
-extern void longjmp(jmp_buf, int);
-extern void _longjmp(jmp_buf, int);
-#endif
-#else
-int sigsetjmp();
-void siglongjmp();
-#ifndef _POSIX_SOURCE
-extern int setjmp();
-extern int _setjmp();
-extern void longjmp();
-extern void _longjmp();
-#endif
-#endif
-#endif
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+int    setjmp __P((jmp_buf));
+void   longjmp __P((jmp_buf, int));
+
+#ifndef _ANSI_SOURCE
+/*
+ * WARNING: sigsetjmp() isn't supported yet, this is a placeholder.
+ */
+int    sigsetjmp __P((sigjmp_buf, int));
+void   siglongjmp __P((sigjmp_buf, int));
+#endif /* not ANSI */
+
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
+int    _setjmp __P((jmp_buf));
+void   _longjmp __P((jmp_buf, int));
+void   longjmperror __P((void));
+#endif /* neither ANSI nor POSIX */
+__END_DECLS
+
+#endif /* !_SETJMP_H_ */