From 8720578d06e298f65f736cbe66c98a309b86325f Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Mon, 23 Feb 2004 03:16:59 +0000 Subject: [PATCH] POSIX clearly states that getsubopt() should be declared in , not in --- include/stdlib.h | 5 ++--- include/unistd.h | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index 23e64090b2d2..f94e7ab82c58 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -177,10 +177,7 @@ double drand48(void); double erand48(unsigned short[3]); /* char *fcvt(double, int, int * __restrict, int * __restrict); */ /* char *gcvt(double, int, int * __restrict, int * __restrict); */ -#ifndef _GETSUBOPT_DECLARED int getsubopt(char **, char *const *, char **); -#define _GETSUBOPT_DECLARED -#endif int grantpt(int); char *initstate(unsigned long /* XSI requires u_int */, char *, long); long jrand48(unsigned short[3]); @@ -277,6 +274,8 @@ __int64_t strtoq(const char *, char **, int); __uint64_t strtouq(const char *, char **, int); + +extern char *suboptarg; /* getsubopt(3) external variable */ #endif /* __BSD_VISIBLE */ __END_DECLS diff --git a/include/unistd.h b/include/unistd.h index da1438a436e7..6a441dd62af2 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -539,11 +539,6 @@ int undelete(const char *); int unwhiteout(const char *); void *valloc(size_t); /* obsoleted by malloc() */ -extern char *suboptarg; /* getsubopt(3) external variable */ -#ifndef _GETSUBOPT_DECLARED -int getsubopt(char **, char * const *, char **); -#define _GETSUBOPT_DECLARED -#endif extern int optreset; /* getopt(3) external variable */ #endif /* __BSD_VISIBLE */ __END_DECLS