diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2001-07-10 17:09:00 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2001-07-10 17:09:00 +0000 |
commit | 5ecb0ad24ff062000e7bae1c5681a97f6d37025c (patch) | |
tree | 815804646c42fb89b4a8005be0c1f82d27b95463 /contrib/groff/src/include | |
parent | af2a8ba6c3e16939879224e370aeb54850188579 (diff) | |
download | src-test2-5ecb0ad24ff062000e7bae1c5681a97f6d37025c.tar.gz src-test2-5ecb0ad24ff062000e7bae1c5681a97f6d37025c.zip |
Notes
Diffstat (limited to 'contrib/groff/src/include')
-rw-r--r-- | contrib/groff/src/include/getopt.h | 17 | ||||
-rw-r--r-- | contrib/groff/src/include/groff-getopt.h | 28 | ||||
-rw-r--r-- | contrib/groff/src/include/lib.h | 16 | ||||
-rw-r--r-- | contrib/groff/src/include/nonposix.h | 3 |
4 files changed, 40 insertions, 24 deletions
diff --git a/contrib/groff/src/include/getopt.h b/contrib/groff/src/include/getopt.h index b0147e9d2ac3..c2f01804c99e 100644 --- a/contrib/groff/src/include/getopt.h +++ b/contrib/groff/src/include/getopt.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. + Copyright (C) 1989-1994, 1996-1999, 2001 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 @@ -23,6 +23,17 @@ # define _GETOPT_H 1 #endif +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include <features.h>, but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include <ctype.h>, which will pull in <features.h> for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include <ctype.h> +#endif + #ifdef __cplusplus extern "C" { #endif @@ -82,7 +93,7 @@ extern int optopt; struct option { -# if defined __STDC__ && __STDC__ +# if (defined __STDC__ && __STDC__) || defined __cplusplus const char *name; # else char *name; @@ -126,7 +137,7 @@ struct option arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ -#if defined __STDC__ && __STDC__ +#if (defined __STDC__ && __STDC__) || defined __cplusplus # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation diff --git a/contrib/groff/src/include/groff-getopt.h b/contrib/groff/src/include/groff-getopt.h index 1807fc7ccfb9..a30e1974dff2 100644 --- a/contrib/groff/src/include/groff-getopt.h +++ b/contrib/groff/src/include/groff-getopt.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. @@ -47,19 +47,19 @@ struct option #define required_argument 1 #define optional_argument 2 -extern int getopt(int __argc, - char *const *__argv, - const char *__shortopts); -extern int getopt_long(int __argc, - char *const *__argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind); -extern int getopt_long_only(int __argc, - char *const *__argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind); +extern int getopt(int, // __argc + char *const *, // __argv + const char *); // __shortopts +extern int getopt_long(int, // __argc + char *const *, // __argv + const char *, // __shortopts + const struct option *, // __longopts + int *); // __longind +extern int getopt_long_only(int, // __argc + char *const *, // __argv + const char *, // __shortopts + const struct option *, // __longopts + int *); // __longind #ifdef __cplusplus } diff --git a/contrib/groff/src/include/lib.h b/contrib/groff/src/include/lib.h index ad416e0a9883..db5277c0c268 100644 --- a/contrib/groff/src/include/lib.h +++ b/contrib/groff/src/include/lib.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 1989-2000 Free Software Foundation, Inc. +/* Copyright (C) 1989-2000, 2001 Free Software Foundation, Inc. Written by James Clark (jjc@jclark.com) This file is part of groff. @@ -19,16 +19,18 @@ with groff; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern "C" { -#ifndef strerror +#ifndef HAVE_STRERROR char *strerror(int); #endif const char *i_to_a(int); const char *if_to_a(int, int); } -/* stdio.h on IRIX and OSF/1 include getopt.h */ +/* stdio.h on IRIX, OSF/1, and UWIN includes getopt.h */ -#if !(defined(__sgi) || (defined(__osf__) && defined(__alpha))) +#if !(defined(__sgi) \ + || (defined(__osf__) && defined(__alpha)) \ + || defined(_UWIN)) #include <groff-getopt.h> #endif @@ -41,8 +43,8 @@ int is_prime(unsigned); #include <strings.h> #endif -FILE *xtmpfile(char **namep=0, char *postfix=0, int do_unlink=1); -char *xtmptemplate(char *extension=0); +FILE *xtmpfile(char **namep = 0, char *postfix = 0, int do_unlink = 1); +char *xtmptemplate(char *extension = 0); #ifdef NEED_DECLARATION_POPEN @@ -56,6 +58,8 @@ extern "C" { int pclose (FILE *); } #endif /* NEED_DECLARATION_PCLOSE */ +size_t file_name_max(const char *fname); + int interpret_lf_args(const char *p); extern char illegal_char_table[]; diff --git a/contrib/groff/src/include/nonposix.h b/contrib/groff/src/include/nonposix.h index 51449832ae35..abd7d1e9ad23 100644 --- a/contrib/groff/src/include/nonposix.h +++ b/contrib/groff/src/include/nonposix.h @@ -27,7 +27,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # define setmode(f,m) _setmode(f,m) #endif -#if defined(__MSDOS__) || (defined(_WIN32) && !defined(__CYGWIN32__)) +#if defined(__MSDOS__) \ + || (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN32__)) /* Binary I/O nuisances. Note: "setmode" is right for DJGPP and Borland; Windows compilers might need _setmode or some such. */ |