Loading...
include/getopt.h Libc-1725.40.4 Libc-320
--- Libc/Libc-1725.40.4/include/getopt.h
+++ Libc/Libc-320/include/getopt.h
@@ -1,5 +1,4 @@
 /*	$NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $	*/
-/*	$FreeBSD: src/include/getopt.h,v 1.6 2004/02/24 08:09:20 ache Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -41,15 +40,12 @@
 #define _GETOPT_H_
 
 #include <sys/cdefs.h>
-#include <_bounds.h>
 #include <unistd.h>
 
-_LIBC_SINGLE_BY_DEFAULT()
-
 /*
- * GNU-like getopt_long()/getopt_long_only() with 4.4BSD optreset extension.
- * getopt() is declared here too for GNU programs.
+ * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
  */
+#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
 #define no_argument        0
 #define required_argument  1
 #define optional_argument  2
@@ -69,21 +65,8 @@
 };
 
 __BEGIN_DECLS
-int	getopt_long(int __argc, char *_LIBC_CSTR const *_LIBC_COUNT(__argc), const char *,
-	const struct option *, int *);
-int	getopt_long_only(int __argc, char * const *_LIBC_COUNT(__argc), const char *,
-	const struct option *, int *);
-#ifndef _GETOPT
-#define	_GETOPT
-int	 getopt(int __argc, char *_LIBC_CSTR const [_LIBC_COUNT(__argc)], const char *) __DARWIN_ALIAS(getopt);
-
-extern char *_LIBC_CSTR optarg;			/* getopt(3) external variables */
-extern int optind, opterr, optopt;
+int getopt_long(int, char * const *, const char *, const struct option *, int *);
+__END_DECLS
 #endif
-#ifndef _OPTRESET
-#define	_OPTRESET
-extern int optreset;			/* getopt(3) external variable */
-#endif
-__END_DECLS
  
 #endif /* !_GETOPT_H_ */