Project Info Name.......: gnu-hello
Description: GNU Hello


gnu-hello       
Info
Commit...:21ff98209ebbbb9c91047062c7d6105f67526669
Author...:karl <>
Committer:karl <>
Date.....:Thu Aug 17 00:06:51 2006 +0000
Parents..:b4d47e3f6df03b4dcd5dcde5beb3312138af4e79

Message
[project @ 2006-08-17 00:06:51 by karl]
gnulib update

Changes
diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
line changes: +27/-1
index c5e7e1c..1b1b6f4
--- a/gnulib/lib/Makefile.am
+++ b/gnulib/lib/Makefile.am
@@ -8,7 +8,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl closeout gettext
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl closeout getopt gettext
 
 AUTOMAKE_OPTIONS = 1.5 gnits no-dependencies
 
@@ -35,6 +35,20 @@ libgnu_a_SOURCES += exit.h
 
 ## end   gnulib module exit
 
+## begin gnulib module getopt
+
+BUILT_SOURCES += $(GETOPT_H)
+EXTRA_DIST += getopt_.h getopt_int.h
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt_.h
+	cp $(srcdir)/getopt_.h $@-t
+	mv $@-t $@
+MOSTLYCLEANFILES += getopt.h getopt.h-t
+
+## end   gnulib module getopt
+
 ## begin gnulib module gettext
 
 # This is for those projects which use "gettextize --intl" to put a source-code
@@ -69,6 +83,18 @@ MOSTLYCLEANFILES += stdbool.h stdbool.h-t
 
 ## end   gnulib module stdbool
 
+## begin gnulib module unistd
+
+BUILT_SOURCES += $(UNISTD_H)
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h:
+	echo '/* Empty placeholder for $@.  */' >$@
+MOSTLYCLEANFILES += unistd.h
+
+## end   gnulib module unistd
+
 ## begin gnulib module xalloc-die
 
 libgnu_a_SOURCES += xalloc-die.c

diff --git a/gnulib/lib/error.c b/gnulib/lib/error.c
line changes: +4/-5
index 34e8365..d8814e0
--- a/gnulib/lib/error.c
+++ b/gnulib/lib/error.c
@@ -310,14 +310,13 @@ error_at_line (int status, int errnum, const char *file_name,
 #endif
     }
 
-  if (file_name != NULL)
-    {
 #if _LIBC
-      __fxprintf (NULL, "%s:%d: ", file_name, line_number);
+  __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+              file_name, line_number);
 #else
-      fprintf (stderr, "%s:%d: ", file_name, line_number);
+  fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+           file_name, line_number);
 #endif
-    }
 
   va_start (args, message);
   error_tail (status, errnum, message, args);

diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c
line changes: +17/-67
index bcb81c8..f37a837
--- a/gnulib/lib/getopt.c
+++ b/gnulib/lib/getopt.c
@@ -2,7 +2,7 @@
    NOTE: getopt is now part of the C library, so if you don't know what
    "Keep this file name-space clean" means, talk to drepper@gnu.org
    before changing it!
-   Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004
+   Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006
 	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -20,30 +20,18 @@
    with this program; if not, write to the Free Software Foundation,
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
-   Ditto for AIX 3.2 and <stdlib.h>.  */
-#ifndef _NO_PROTO
-# define _NO_PROTO
-#endif
-
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
-#include <stdio.h>
-
-/* This needs to come after some library #include
-   to get __GNU_LIBRARY__ defined.  */
-#ifdef	__GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
-   contain conflicting prototypes for getopt.  */
-# include <stdlib.h>
-# include <unistd.h>
-#endif	/* GNU C library.  */
+#include "getopt.h"
 
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
-#ifdef VMS
+#ifdef __VMS
 # include <unixlib.h>
 #endif
 
@@ -76,7 +64,6 @@
    GNU application programs can use a third alternative mode in which
    they can distinguish the relative order of options and other arguments.  */
 
-#include "getopt.h"
 #include "getopt_int.h"
 
 /* For communication from `getopt' to the caller.
@@ -118,16 +105,9 @@ int optopt = '?';
 static struct _getopt_data getopt_data;
 
 
-#ifndef __GNU_LIBRARY__
-
-/* Avoid depending on library functions or files
-   whose names are inconsistent.  */
-
-#ifndef getenv
+#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
 extern char *getenv ();
 #endif
-
-#endif /* not __GNU_LIBRARY__ */
 
 #ifdef _LIBC
 /* Stored original parameters.
@@ -556,10 +536,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 		  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		  if (_IO_fwide (stderr, 0) > 0)
-		    __fwprintf (stderr, L"%s", buf);
-		  else
-		    fputs (buf, stderr);
+		  __fxprintf (NULL, "%s", buf);
 
 		  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		  _IO_funlockfile (stderr);
@@ -634,10 +611,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 			  ((_IO_FILE *) stderr)->_flags2
 			    |= _IO_FLAGS2_NOTCANCEL;
 
-			  if (_IO_fwide (stderr, 0) > 0)
-			    __fwprintf (stderr, L"%s", buf);
-			  else
-			    fputs (buf, stderr);
+			  __fxprintf (NULL, "%s", buf);
 
 			  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			  _IO_funlockfile (stderr);
@@ -674,10 +648,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 			  ((_IO_FILE *) stderr)->_flags2
 			    |= _IO_FLAGS2_NOTCANCEL;
 
-			  if (_IO_fwide (stderr, 0) > 0)
-			    __fwprintf (stderr, L"%s", buf);
-			  else
-			    fputs (buf, stderr);
+			  __fxprintf (NULL, "%s", buf);
 
 			  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			  _IO_funlockfile (stderr);
@@ -751,10 +722,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 		  int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		  ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		  if (_IO_fwide (stderr, 0) > 0)
-		    __fwprintf (stderr, L"%s", buf);
-		  else
-		    fputs (buf, stderr);
+		  __fxprintf (NULL, "%s", buf);
 
 		  ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		  _IO_funlockfile (stderr);
@@ -817,10 +785,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 		int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		if (_IO_fwide (stderr, 0) > 0)
-		  __fwprintf (stderr, L"%s", buf);
-		else
-		  fputs (buf, stderr);
+		__fxprintf (NULL, "%s", buf);
 
 		((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		_IO_funlockfile (stderr);
@@ -868,10 +833,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 		    int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		    ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		    if (_IO_fwide (stderr, 0) > 0)
-		      __fwprintf (stderr, L"%s", buf);
-		    else
-		      fputs (buf, stderr);
+		    __fxprintf (NULL, "%s", buf);
 
 		    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		    _IO_funlockfile (stderr);
@@ -940,10 +902,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 		    int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 		    ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-		    if (_IO_fwide (stderr, 0) > 0)
-		      __fwprintf (stderr, L"%s", buf);
-		    else
-		      fputs (buf, stderr);
+		    __fxprintf (NULL, "%s", buf);
 
 		    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 		    _IO_funlockfile (stderr);
@@ -985,10 +944,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 			    ((_IO_FILE *) stderr)->_flags2
 			      |= _IO_FLAGS2_NOTCANCEL;
 
-			    if (_IO_fwide (stderr, 0) > 0)
-			      __fwprintf (stderr, L"%s", buf);
-			    else
-			      fputs (buf, stderr);
+			    __fxprintf (NULL, "%s", buf);
 
 			    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			    _IO_funlockfile (stderr);
@@ -1027,10 +983,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 			    ((_IO_FILE *) stderr)->_flags2
 			      |= _IO_FLAGS2_NOTCANCEL;
 
-			    if (_IO_fwide (stderr, 0) > 0)
-			      __fwprintf (stderr, L"%s", buf);
-			    else
-			      fputs (buf, stderr);
+			    __fxprintf (NULL, "%s", buf);
 
 			    ((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			    _IO_funlockfile (stderr);
@@ -1101,10 +1054,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
 			int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
 			((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
 
-			if (_IO_fwide (stderr, 0) > 0)
-			  __fwprintf (stderr, L"%s", buf);
-			else
-			  fputs (buf, stderr);
+			__fxprintf (NULL, "%s", buf);
 
 			((_IO_FILE *) stderr)->_flags2 = old_flags2;
 			_IO_funlockfile (stderr);

diff --git a/gnulib/lib/getopt1.c b/gnulib/lib/getopt1.c
line changes: +1/-1
index 5acd224..25d7926
--- a/gnulib/lib/getopt1.c
+++ b/gnulib/lib/getopt1.c
@@ -18,7 +18,7 @@
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifdef HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
 #endif
 
 #ifdef _LIBC

diff --git a/gnulib/lib/getopt_.h b/gnulib/lib/getopt_.h
line changes: +2/-4
index a4e78cb..3c406e5
--- a/gnulib/lib/getopt_.h
+++ b/gnulib/lib/getopt_.h
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -34,9 +34,7 @@
 #if defined __GETOPT_PREFIX && !defined __need_getopt
 # include <stdlib.h>
 # include <stdio.h>
-# if HAVE_UNISTD_H
-#  include <unistd.h>
-# endif
+# include <unistd.h>
 # undef __need_getopt
 # undef getopt
 # undef getopt_long

diff --git a/gnulib/m4/getopt.m4 b/gnulib/m4/getopt.m4
line changes: +47/-36
index 79c6991..c0a73b2
--- a/gnulib/m4/getopt.m4
+++ b/gnulib/m4/getopt.m4
@@ -1,72 +1,83 @@
-# getopt.m4 serial 9
-dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# getopt.m4 serial 13
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
 # The getopt module assume you want GNU getopt, with getopt_long etc,
-# rather than vanilla POSIX getopt.  This means your your code should
+# rather than vanilla POSIX getopt.  This means your code should
 # always include <getopt.h> for the getopt prototypes.
 
 AC_DEFUN([gl_GETOPT_SUBSTITUTE],
 [
-  GETOPT_H=getopt.h
   AC_LIBOBJ([getopt])
   AC_LIBOBJ([getopt1])
+  gl_GETOPT_SUBSTITUTE_HEADER
+  gl_PREREQ_GETOPT
+])
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
+[
+  GETOPT_H=getopt.h
   AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
     [Define to rpl_ if the getopt replacement functions and variables
      should be used.])
   AC_SUBST([GETOPT_H])
 ])
 
-AC_DEFUN([gl_GETOPT],
+AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
 [
-  gl_PREREQ_GETOPT
-
   if test -z "$GETOPT_H"; then
-    GETOPT_H=
     AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
-    if test -z "$GETOPT_H"; then
-      AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
-    fi
+  fi
 
-    dnl BSD getopt_long uses an incompatible method to reset option processing,
-    dnl and (as of 2004-10-15) mishandles optional option-arguments.
-    if test -z "$GETOPT_H"; then
-      AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
-    fi
+  if test -z "$GETOPT_H"; then
+    AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
+  fi
 
-    dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
-    dnl option string (as of 2005-05-05).
-    if test -z "$GETOPT_H"; then
-      AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
+  dnl BSD getopt_long uses an incompatible method to reset option processing,
+  dnl and (as of 2004-10-15) mishandles optional option-arguments.
+  if test -z "$GETOPT_H"; then
+    AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
+  fi
+
+  dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+  dnl option string (as of 2005-05-05).
+  if test -z "$GETOPT_H"; then
+    AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
       [AC_RUN_IFELSE(
-        [AC_LANG_PROGRAM([#include <getopt.h>],
+	[AC_LANG_PROGRAM([#include <getopt.h>],
 	   [[
 	     char *myargv[3];
 	     myargv[0] = "conftest";
 	     myargv[1] = "-+";
 	     myargv[2] = 0;
 	     return getopt (2, myargv, "+a") != '?';
-           ]])],
-        [gl_cv_func_gnu_getopt=yes],
-        [gl_cv_func_gnu_getopt=no],
-        [dnl cross compiling - pessimistically guess based on decls
-         dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
-         dnl option string (as of 2005-05-05).
-         AC_CHECK_DECL([getopt_clip],
+	   ]])],
+	[gl_cv_func_gnu_getopt=yes],
+	[gl_cv_func_gnu_getopt=no],
+	[dnl cross compiling - pessimistically guess based on decls
+	 dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+	 dnl option string (as of 2005-05-05).
+	 AC_CHECK_DECL([getopt_clip],
 	   [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes],
 	   [#include <getopt.h>])])])
-      if test "$gl_cv_func_gnu_getopt" = "no"; then
-	GETOPT_H=getopt.h
-      fi
-    fi
-
-    if test -n "$GETOPT_H"; then
-      gl_GETOPT_SUBSTITUTE
+    if test "$gl_cv_func_gnu_getopt" = "no"; then
+      GETOPT_H=getopt.h
     fi
   fi
 ])
 
+AC_DEFUN([gl_GETOPT_IFELSE],
+[
+  AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+  AS_IF([test -n "$GETOPT_H"], [$1], [$2])
+])
+
+AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
+
 # Prerequisites of lib/getopt*.
-AC_DEFUN([gl_PREREQ_GETOPT], [:])
+AC_DEFUN([gl_PREREQ_GETOPT],
+[
+  AC_CHECK_DECLS_ONCE([getenv])
+])

diff --git a/gnulib/m4/gnulib-cache.m4 b/gnulib/m4/gnulib-cache.m4
line changes: +2/-2
index 5ce51a2..771d0e0
--- a/gnulib/m4/gnulib-cache.m4
+++ b/gnulib/m4/gnulib-cache.m4
@@ -15,10 +15,10 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl closeout gettext
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --no-libtool --macro-prefix=gl closeout getopt gettext
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
-gl_MODULES([closeout gettext])
+gl_MODULES([closeout getopt gettext])
 gl_AVOID([])
 gl_SOURCE_BASE([gnulib/lib])
 gl_M4_BASE([gnulib/m4])

diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4
line changes: +8/-0
index 01fc8e2..a8921a5
--- a/gnulib/m4/gnulib-comp.m4
+++ b/gnulib/m4/gnulib-comp.m4
@@ -36,10 +36,12 @@ AC_DEFUN([gl_INIT],
   gl_ERROR
   gl_EXITFAIL
   gl_FUNC_FPENDING
+  gl_GETOPT
   dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
   AM_GNU_GETTEXT_VERSION([0.15])
   gl_QUOTEARG
   AM_STDBOOL_H
+  gl_HEADER_UNISTD
   gl_XALLOC
 ])
 
@@ -58,6 +60,10 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/exit.h
   lib/exitfail.c
   lib/exitfail.h
+  lib/getopt.c
+  lib/getopt1.c
+  lib/getopt_.h
+  lib/getopt_int.h
   lib/gettext.h
   lib/quotearg.c
   lib/quotearg.h
@@ -71,6 +77,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/error.m4
   m4/exitfail.m4
   m4/fpending.m4
+  m4/getopt.m4
   m4/gettext.m4
   m4/glibc2.m4
   m4/glibc21.m4
@@ -101,6 +108,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/strerror_r.m4
   m4/uintmax_t.m4
   m4/ulonglong.m4
+  m4/unistd_h.m4
   m4/visibility.m4
   m4/wchar_t.m4
   m4/wint_t.m4

diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4
line changes: +18/-0
index 0000000..9c77f9b
--- /dev/null
+++ b/gnulib/m4/unistd_h.m4
@@ -0,0 +1,18 @@
+# unistd_h.m4 serial 2
+dnl Copyright (C) 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson
+
+AC_DEFUN([gl_HEADER_UNISTD],
+[
+  dnl Prerequisites of lib/unistd.h.
+  AC_CHECK_HEADERS([unistd.h], [
+    UNISTD_H=''
+  ], [
+    UNISTD_H='unistd.h'
+  ])
+  AC_SUBST(UNISTD_H)
+])

diff --git a/po/POTFILES.in b/po/POTFILES.in
line changes: +0/-1
index a0d12df..f2f84a3
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,7 +5,6 @@
 # notice and this notice are preserved.
 #  
 # List of source files containing translatable strings.
-# The last line must not be a comment.
 
 # Package source files.
 src/hello.c

This website is licensed under AGPL-3.0. Feel free to copy!