summary refs log tree commit diff
path: root/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/fmtmsg.c4
-rw-r--r--stdlib/longlong.h2
-rw-r--r--stdlib/stdlib.h24
-rw-r--r--stdlib/ucontext.h52
4 files changed, 74 insertions, 8 deletions
diff --git a/stdlib/fmtmsg.c b/stdlib/fmtmsg.c
index e7aab90046..69ed9034a9 100644
--- a/stdlib/fmtmsg.c
+++ b/stdlib/fmtmsg.c
@@ -92,7 +92,8 @@ static int print;
 
 /* Prototypes for local functions.  */
 static void init (void);
-static int internal_addseverity (int severity, const char *string);
+static int internal_addseverity (int severity, const char *string)
+     internal_function;
 
 
 int
@@ -273,6 +274,7 @@ init (void)
 
 /* Add the new entry to the list.  */
 static int
+internal_function
 internal_addseverity (int severity, const char *string)
 {
   struct severity_info *runp, *lastp;
diff --git a/stdlib/longlong.h b/stdlib/longlong.h
index 8bb6995cd0..40ccc89cc3 100644
--- a/stdlib/longlong.h
+++ b/stdlib/longlong.h
@@ -1139,7 +1139,7 @@ extern USItype __udiv_qrnnd ();
     (q) = __udiv_qrnnd (&__r, (n1), (n0), (d));				\
     (r) = __r;								\
   } while (0)
-extern USItype __udiv_qrnnd ();
+extern USItype __udiv_qrnnd __P ((USItype *, USItype, USItype, USItype));
 #define UDIV_TIME 140
 #endif /* LONGLONG_STANDALONE */
 #endif /* udiv_qrnnd */
diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
index a92df4bc9e..2adefb508f 100644
--- a/stdlib/stdlib.h
+++ b/stdlib/stdlib.h
@@ -188,23 +188,35 @@ extern __long_double_t __strtold_internal __P ((__const char *
 						__restrict __nptr,
 						char **__restrict __endptr,
 						int __group));
+#ifndef __strtol_internal_defined
 extern long int __strtol_internal __P ((__const char *__restrict __nptr,
 					char **__restrict __endptr,
 					int __base, int __group));
+# define __strtol_internal_defined	1
+#endif
+#ifndef __strtoul_internal_defined
 extern unsigned long int __strtoul_internal __P ((__const char *
 						  __restrict __nptr,
 						  char **__restrict __endptr,
 						  int __base, int __group));
-#ifdef __GNUC__
+# define __strtoul_internal_defined	1
+#endif
+#if defined __GNUC__ || defined __USE_ISOC9X
+# ifndef __strtoll_internal_defined
 extern long long int __strtoll_internal __P ((__const char *__restrict __nptr,
 					      char **__restrict __endptr,
 					      int __base, int __group));
+#  define __strtoll_internal_defined	1
+# endif
+# ifndef __strtoull_internal_defined
 extern unsigned long long int __strtoull_internal __P ((__const char *
 							__restrict __nptr,
 							char **
 							__restrict __endptr,
 							int __base,
 							int __group));
+#  define __strtoull_internal_defined	1
+# endif
 #endif /* GCC */
 
 #if defined __OPTIMIZE__ && __GNUC__ >= 2
@@ -307,7 +319,7 @@ extern char *l64a __P ((long int __n));
 extern long int a64l __P ((__const char *__s));
 
 
-#include <sys/types.h>	/* we need int32_t... */
+# include <sys/types.h>	/* we need int32_t... */
 
 /* These are the functions that actually do things.  The `random', `srandom',
    `initstate' and `setstate' functions are those from BSD Unices.
@@ -411,7 +423,7 @@ struct drand48_data
     int init;			/* Flag for initializing.  */
   };
 
-#ifdef __USE_MISC
+# ifdef __USE_MISC
 /* Return non-negative, double-precision floating-point value in [0.0,1.0).  */
 extern int drand48_r __P ((struct drand48_data *__buffer, double *__result));
 extern int __erand48_r __P ((unsigned short int __xsubi[3],
@@ -449,7 +461,7 @@ extern int __lcong48_r __P ((unsigned short int __param[7],
 			     struct drand48_data *__buffer));
 extern int lcong48_r __P ((unsigned short int __param[7],
 			   struct drand48_data *__buffer));
-#endif	/* Use misc.  */
+# endif	/* Use misc.  */
 
 /* Internal function to compute next state of the generator.  */
 extern int __drand48_iterate __P ((unsigned short int __xsubi[3],
@@ -647,7 +659,7 @@ extern char *qfcvt __P ((__long_double_t __value, int __ndigit, int *__decpt,
 extern char *qgcvt __P ((__long_double_t __value, int __ndigit, char *__buf));
 
 
-#ifdef __USE_MISC
+# ifdef __USE_MISC
 /* Reentrant version of the functions above which provide their own
    buffers.  */
 extern int ecvt_r __P ((double __value, int __ndigit, int *__decpt,
@@ -659,7 +671,7 @@ extern int qecvt_r __P ((__long_double_t __value, int __ndigit, int *__decpt,
 			 int *__sign, char *__buf, size_t __len));
 extern int qfcvt_r __P ((__long_double_t __value, int __ndigit, int *__decpt,
 			 int *__sign, char *__buf, size_t __len));
-#endif	/* misc */
+# endif	/* misc */
 #endif	/* use MISC || use X/Open Unix */
 
 
diff --git a/stdlib/ucontext.h b/stdlib/ucontext.h
new file mode 100644
index 0000000000..2fd65767a6
--- /dev/null
+++ b/stdlib/ucontext.h
@@ -0,0 +1,52 @@
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* System V ABI compliant user-level context switching support.  */
+
+#ifndef _UCONTEXT_H
+#define _UCONTEXT_H	1
+
+#include <features.h>
+
+/* Get machine dependent definition of data structures.  */
+#include <sys/ucontext.h>
+
+__BEGIN_DECLS
+
+/* Get user context and store it in variable pointed to by UCP.  */
+extern int getcontext __P ((ucontext_t *__ucp));
+
+/* Set user context from information of variable pointed to by UCP.  */
+extern int setcontext __P ((ucontext_t *__ucp));
+
+/* Save current context in context variable pointed to by OUCP and set
+   context from variable pointed to by UCP.  */
+extern int swapcontext __P ((ucontext_t *__oucp, ucontext_t *__ucp));
+
+/* Manipulate user context UCP to continue with calling functions FUNC
+   and the ARGC-1 parameters following ARGC when the context is used
+   the next time in `setcontext' or `swapcontext'.
+
+   We cannot say anything about the parameters FUNC takes; `void'
+   is as good as any other choice.  */
+extern void makecontext __P ((ucontext_t *__ucp, void (*__func) __P ((void)),
+			      int __argc, ...));
+
+__END_DECLS
+
+#endif /* ucontext.h */