summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwl <wl>2006-01-11 00:37:42 +0000
committerwl <wl>2006-01-11 00:37:42 +0000
commit2871931e6427b77d9ff7d139bfc063d640147f1a (patch)
tree215c890b9da742d8fd9a3ae8cf088d15c864b421 /src
parent277273f8a652d7ffbb483590caebe4f509575ce2 (diff)
downloadgroff-2871931e6427b77d9ff7d139bfc063d640147f1a.tar.gz
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/include/config.hin4
-rw-r--r--src/libs/libgroff/Makefile.sub4
-rw-r--r--src/libs/libgroff/localcharset.c32
-rw-r--r--src/libs/libgroff/relocatable.h2
4 files changed, 25 insertions, 17 deletions
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)