diff options
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | Makefile.in | 16 | ||||
-rwxr-xr-x | configure | 70 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/include/config.hin | 4 | ||||
-rw-r--r-- | src/libs/libgroff/Makefile.sub | 4 | ||||
-rw-r--r-- | src/libs/libgroff/localcharset.c | 32 | ||||
-rw-r--r-- | src/libs/libgroff/relocatable.h | 2 |
8 files changed, 119 insertions, 25 deletions
@@ -1,3 +1,17 @@ +2006-01-11 Werner LEMBERG <wl@gnu.org> + + * configure.ac: Test for getc_unlocked (needed for localcharset). + * configure, src/include/config.hin: Regenerated. + + * src/libs/libgroff/Makefile.sub (EXTRA_CFLAGS): Define + ENABLE_RELOCATABLE. + + * src/libs/libgroff/relocatable.h: New dummy header file for + localcharset.c. + + * src/libs/libgroff/localcharset.c: Updated to (unchanged) CVS + gnulib version. + 2006-01-10 Bruno Haible <bruno@clisp.org> Work around unportability of nl_langinfo(CODESET). diff --git a/Makefile.in b/Makefile.in index ebc2c6e9..55975f0a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,4 +1,4 @@ -# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005 +# Copyright (C) 1989-2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # @@ -265,12 +265,6 @@ make_install_pdfdoc=@make_install_pdfdoc@ # -DWORDS_BIGENDIAN if your target platform is big-endian # -DIS_EBCDIC_HOST if the host's encoding is EBCDIC # -# -DHAVE_DECL_SYS_SIGLIST if you have sys_siglist[] -# -DWCOREFLAG=0200 if the 0200 bit of the status returned by -# wait() indicates whether a core image was -# produced for a process that was terminated -# by a signal -# # -DHAVE_DIRECT_H if you have <direct.h> # -DHAVE_DIRENT_H if you have <dirent.h> # -DHAVE_CC_INTTYPES_H if you have a C++ <inttypes.h> @@ -331,6 +325,9 @@ make_install_pdfdoc=@make_install_pdfdoc@ # -DNEED_DECLARATION_VSNPRINTF if your C++ <stdio.h> doesn't declare # vsnprintf() # +# -DHAVE_DECL_GETC_UNLOCKED if you have getc_unlocked() +# -DHAVE_DECL_SYS_SIGLIST if you have sys_siglist[] +# # -DHAVE_STRUCT_EXCEPTION if <math.h> defines struct exception # -DHAVE_SYS_NERR if you have sysnerr in <errno.h> or <stdio.h> # -DHAVE_SYS_ERRLIST if you have sys_errlist in <errno.h> or @@ -340,6 +337,11 @@ make_install_pdfdoc=@make_install_pdfdoc@ # -DRETSIGTYPE=int if signal handlers return int not void # -DRET_TYPE_SRAND_IS_VOID if srand() returns void not int # +# -DWCOREFLAG=0200 if the 0200 bit of the status returned by +# wait() indicates whether a core image was +# produced for a process that was terminated +# by a signal +# # -Duintmax_t=<value> define to `unsigned long' or `unsigned long # long' if <inttypes.h> does not exist # @@ -10703,6 +10703,76 @@ _ACEOF fi +echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 +echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6 +if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef getc_unlocked + char *p = (char *) getc_unlocked; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_have_decl_getc_unlocked=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_have_decl_getc_unlocked=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 +echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6 +if test $ac_cv_have_decl_getc_unlocked = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED 1 +_ACEOF + + +else + cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED 0 +_ACEOF + + +fi diff --git a/configure.ac b/configure.ac index 36e120dd..ba4410bd 100644 --- a/configure.ac +++ b/configure.ac @@ -102,7 +102,7 @@ AC_CHECK_FUNCS([vsnprintf], [], [AC_LIBOBJ([snprintf])]) LIBS="$saved_libs" AC_CHECK_FUNCS([gettimeofday isatty kill rename setlocale strsep]) GROFF_MKSTEMP -AC_CHECK_DECLS([sys_siglist]) +AC_CHECK_DECLS([sys_siglist, getc_unlocked]) AM_LANGINFO_CODESET # checks for compiler characteristics diff --git a/src/include/config.hin b/src/include/config.hin index 72606334..08e60015 100644 --- a/src/include/config.hin +++ b/src/include/config.hin @@ -12,6 +12,10 @@ /* Define if you have a C++ <osfcn.h>. */ #undef HAVE_CC_OSFCN_H +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#undef HAVE_DECL_GETC_UNLOCKED + /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST diff --git a/src/libs/libgroff/Makefile.sub b/src/libs/libgroff/Makefile.sub index 1b55fdb0..ac83892f 100644 --- a/src/libs/libgroff/Makefile.sub +++ b/src/libs/libgroff/Makefile.sub @@ -1,5 +1,7 @@ LIB=groff -EXTRA_CFLAGS=-D__GETOPT_PREFIX=groff_ -DLIBDIR=\"$(libdir)\" +EXTRA_CFLAGS=-D__GETOPT_PREFIX=groff_ \ + -DENABLE_RELOCATABLE=1 \ + -DLIBDIR=\"$(libdir)\" OBJS=\ assert.$(OBJEXT) \ change_lf.$(OBJEXT) \ diff --git a/src/libs/libgroff/localcharset.c b/src/libs/libgroff/localcharset.c index 51af9282..d03ab79d 100644 --- a/src/libs/libgroff/localcharset.c +++ b/src/libs/libgroff/localcharset.c @@ -1,21 +1,20 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2005 Free Software Foundation, Inc. + Copyright (C) 2000-2006 Free Software Foundation, Inc. - This program 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, or (at your option) + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) any later version. This program 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. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* Written by Bruno Haible <bruno@clisp.org>. */ @@ -67,10 +66,11 @@ # include <os2.h> #endif -/* BEGIN GROFF-LOCAL SECTION */ -#include "relocate.h" -#define relocate(path) relocatep(path) -/* END GROFF-LOCAL SECTION */ +#if ENABLE_RELOCATABLE +# include "relocatable.h" +#else +# define relocate(pathname) (pathname) +#endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Win32, Cygwin, OS/2, DOS */ @@ -106,7 +106,7 @@ static const char * volatile charset_aliases; /* Return a pointer to the contents of the charset.alias file. */ static const char * -get_charset_aliases () +get_charset_aliases (void) { const char *cp; @@ -286,7 +286,7 @@ get_charset_aliases () STATIC #endif const char * -locale_charset () +locale_charset (void) { const char *codeset; const char *aliases; diff --git a/src/libs/libgroff/relocatable.h b/src/libs/libgroff/relocatable.h new file mode 100644 index 00000000..ac608fe9 --- /dev/null +++ b/src/libs/libgroff/relocatable.h @@ -0,0 +1,2 @@ +#include "relocate.h" +#define relocate(path) relocatep(path) |