From ec489443c547a071b108cd48b9f4d62cffb23faf Mon Sep 17 00:00:00 2001 From: wl Date: Sat, 30 Apr 2005 07:03:13 +0000 Subject: AC_TYPE_SIGNAL from current autoconf can fail if CC=g++. * aclocal.m4 (GROFF_TYPE_SIGNAL): New function. * configure.ac: Use GROFF_TYPE_SIGNAL, not AC_TYPE_SIGNAL. * configure, src/include/config.hin: Regenerated. * PROBLEMS: Updated. Update getopt files. * src/include/getopt.h, src/libs/libgroff/getopt.c, src/libs/libgroff/getopt1.c: Updated from GNU libc CVS. * src/include/getopt_int.h: New file (from GNU libc CVS). * src/include/groff-getopt.h: Updated. * src/include/Makefile.sub (HDRS): Add getopt_int.h. * font/devutf8/NOTES: Updated. Bug fix for Win32 relocatable code. Based on a patch from Keith Marshall. * src/libs/libgroff/maxpathname.cpp (PATH_MAX): Test for `_MAX_PATH' also. * src/libs/libgroff/relocate.c (DEBUG): Define it conditionally. (searchpath) [_WIN32]: Use `_fullpath', not `realpath'. --- src/include/Makefile.sub | 1 + src/include/config.hin | 3 +++ src/include/getopt.h | 52 +++++++++++++++++++++------------------------- src/include/groff-getopt.h | 11 ++++++---- 4 files changed, 35 insertions(+), 32 deletions(-) (limited to 'src/include') diff --git a/src/include/Makefile.sub b/src/include/Makefile.sub index 62aecb2c..55f4d826 100644 --- a/src/include/Makefile.sub +++ b/src/include/Makefile.sub @@ -11,6 +11,7 @@ HDRS=\ font.h \ geometry.h \ getopt.h \ + getopt_int.h \ groff-getopt.h \ htmlhint.h \ index.h \ diff --git a/src/include/config.hin b/src/include/config.hin index 0702c446..5f871aaa 100644 --- a/src/include/config.hin +++ b/src/include/config.hin @@ -203,6 +203,9 @@ core image was produced for a process that was terminated by a signal. */ #undef WCOREFLAG +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING + /* Define if -D_POSIX_SOURCE is necessary. */ #undef _POSIX_SOURCE diff --git a/src/include/getopt.h b/src/include/getopt.h index 4283c35b..b7a026c5 100644 --- a/src/include/getopt.h +++ b/src/include/getopt.h @@ -1,5 +1,6 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1989-1994,1996-1999,2001,2003,2004 + 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 @@ -34,6 +35,17 @@ # include #endif +#ifndef __THROW +# ifndef __GNUC_PREREQ +# define __GNUC_PREREQ(maj, min) (0) +# endif +# if defined __cplusplus && __GNUC_PREREQ (2,8) +# define __THROW throw () +# else +# define __THROW +# endif +#endif + #ifdef __cplusplus extern "C" { #endif @@ -93,11 +105,7 @@ extern int optopt; struct option { -# if (defined __STDC__ && __STDC__) || defined __cplusplus const char *name; -# else - char *name; -# endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; @@ -137,39 +145,27 @@ struct option arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ -#if (defined __STDC__ && __STDC__) || defined __cplusplus -# ifdef __GNU_LIBRARY__ +#ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); -# else /* not __GNU_LIBRARY__ */ +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) + __THROW; +#else /* not __GNU_LIBRARY__ */ extern int getopt (); -# endif /* __GNU_LIBRARY__ */ +#endif /* __GNU_LIBRARY__ */ -# ifndef __need_getopt +#ifndef __need_getopt extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, - const struct option *__longopts, int *__longind); + const struct option *__longopts, int *__longind) + __THROW; extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, - const struct option *__longopts, int *__longind); + const struct option *__longopts, int *__longind) + __THROW; -/* Internal only. Users should not call this directly. */ -extern int _getopt_internal (int ___argc, char *const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only); -# endif -#else /* not __STDC__ */ -extern int getopt (); -# ifndef __need_getopt -extern int getopt_long (); -extern int getopt_long_only (); - -extern int _getopt_internal (); -# endif -#endif /* __STDC__ */ +#endif #ifdef __cplusplus } diff --git a/src/include/groff-getopt.h b/src/include/groff-getopt.h index a30e1974..cf3936f6 100644 --- a/src/include/groff-getopt.h +++ b/src/include/groff-getopt.h @@ -1,5 +1,5 @@ // -*- C++ -*- -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2005 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. @@ -49,17 +49,20 @@ struct option extern int getopt(int, // __argc char *const *, // __argv - const char *); // __shortopts + const char *) // __shortopts + throw(); extern int getopt_long(int, // __argc char *const *, // __argv const char *, // __shortopts const struct option *, // __longopts - int *); // __longind + int *) // __longind + throw(); extern int getopt_long_only(int, // __argc char *const *, // __argv const char *, // __shortopts const struct option *, // __longopts - int *); // __longind + int *) // __longind + throw(); #ifdef __cplusplus } -- cgit v1.2.1