Skip to content

Commit 4013d14

Browse files
brkorbbhaible
authored andcommitted
libposix: Revert the unreviewed part of yesterday's big merge.
Back out yesterday's big merge from the libposix branch, except for the openat-die.c change that was reviewed and approved by Paul Eggert. Put the ChangeLog entry at the top, to reflect the order of changes in the master branch.
1 parent ad98f8e commit 4013d14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+12
-253
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,3 @@
66
allsnippets.tmp
77
amsnippet.tmp
88
testdir*
9-
*.diff
10-
*.patch

ChangeLog

+8-82
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
* m4/setenv.m4 (gl_FUNC_UNSETENV): Also detect Haiku issue.
55
* doc/posix-functions/unsetenv.texi (unsetenv): Document it.
66

7+
2010-12-30 Bruce Korb <[email protected]>
8+
9+
libposix: avoid calling error() within libposix
10+
* lib/openat-die.c: remove error module stuff when GNULIB_LIBPOSIX
11+
is defined.
12+
13+
2011-02-05 Eric Blake <[email protected]>
14+
715
strerror_r-posix: port to cygwin
816
* lib/strerror_r.c (strerror_r) [__CYGWIN__]: Add cygwin
917
implementation.
@@ -1914,13 +1922,6 @@
19141922
* doc/posix-functions/gmtime_r.texi: Document the HP-UX 11 problem.
19151923
* doc/posix-functions/localtime_r.texi: Likewise.
19161924

1917-
2010-12-30 Bruce Korb <[email protected]>
1918-
1919-
libposix: avoid calling error() within libposix
1920-
* lib/openat-die.c: remove error module stuff when GNULIB_LIBPOSIX
1921-
is defined.
1922-
* lib/xalloc-die.c: Same thing.
1923-
19241925
2010-12-29 Eric Blake <[email protected]>
19251926

19261927
mountlist: tweak previous commit
@@ -3566,13 +3567,6 @@
35663567
* lib/ftoastr.h, lib/ftoastr.c, lib/dtoastr.c, lib/ldtoastr.c:
35673568
* modules/ftoastr: New files.
35683569

3569-
2010-11-16 Bruce Korb <[email protected]>
3570-
3571-
libposix: Libposix module will be created on the fly
3572-
* modules/libposix: remove
3573-
* modules/*: Use pkginclude_HEADERS instead of plain "include".
3574-
* gnulib-tool: adjust here, too
3575-
35763570
2010-11-15 Paul Eggert <[email protected]>
35773571

35783572
bootstrap: port to Solaris sed
@@ -4152,74 +4146,6 @@
41524146
and use malloc rather than the stack for the same reason as
41534147
mentioned in the comment justifying the other allocation.
41544148

4155-
2010-10-12 Gary V. Vaughan <[email protected]>
4156-
4157-
libposix: use git-version-gen for version numbering
4158-
* build-aux/git-version-gen: In order to work inside the
4159-
libposix subdirectory, also check the parent directory for .git
4160-
before assuming git describe will not work.
4161-
4162-
add _HEADERS primaries to Makefile.am snippets for installable headers
4163-
* modules/alloca-opt, modules/arg-nonnull, modules/argz,
4164-
modules/arpa_inet, modules/byteswap, modules/c++defs, modules/ctype,
4165-
modules/dirent, modules/errno, modules/fcntl-h, modules/float,
4166-
modules/fnmatch, modules/getopt-posix, modules/glob, modules/iconv-h,
4167-
modules/iconv_open, modules/inttypes, modules/langinfo,
4168-
modules/link-warning, modules/locale, modules/math, modules/netdb,
4169-
modules/netinet_in, modules/poll-h, modules/pthread, modules/pty,
4170-
modules/sched, modules/search, modules/selinux-h, modules/signal,
4171-
modules/spawn, modules/stdarg, modules/stdbool, modules/stddef,
4172-
modules/stdint, modules/stdio, modules/stdlib, modules/string,
4173-
modules/strings, modules/sys_file, modules/sys_ioctl,
4174-
modules/sys_select, modules/sys_socket, modules/sys_stat,
4175-
modules/sys_time, modules/sys_times, modules/sys_utsname,
4176-
modules/sys_wait, modules/sysexits, modules/termios, modules/time,
4177-
modules/unistd, modules/unitypes, modules/unused-parameter,
4178-
modules/warn-on-use, modules/wchar, modules/wctype (Makefile.am):
4179-
Add nodist_include_HEADERS, nobase_nodist_include_HEADERS and
4180-
EXTRA_HEADERS declarations for potentially installable header files.
4181-
* gnulib-tool: Initialize nodist_include_HEADERS,
4182-
nobase_nodist_include_HEADERS and EXTRA_HEADERS to prime for new
4183-
`.*_HEADERS +=' declarations.
4184-
(func_emit_lib_Makefile_am): Edit away new nodist_include_HEADERS,
4185-
nobase_nodist_include_HEADERS and EXTRA_HEADERS declarations by
4186-
default, reverting the Makefile.am snippets above to their original
4187-
condition prior to this change *unless* the gnulib library is being
4188-
installed.
4189-
4190-
New module `libposix'.
4191-
* modules/libposix: New module to facilitate an installable
4192-
library of posix modules.
4193-
(Makefile.am): Use lib_LTLIBRARIES to mark libposix.la as
4194-
installable.
4195-
(Depends-On): List all the modules found by `posix-modules',
4196-
except `strdup' which is spurious, and with the addition of
4197-
`alloca' to satisfy an otherwise undefined LTALLOCA definition;
4198-
and `progname' to provide a non-extern program_name symbol so that
4199-
compilation with `-no-undefined' symbols can work.
4200-
4201-
iconv_open: reduce not-trivial repetition of file-list
4202-
* modules/iconv_open (iconv_headers): New make macro to hold list of
4203-
iconv header files.
4204-
(BUILT_SOURCES, MAINTAINERCLEANFILES, EXTRA_DIST): Use it instead of
4205-
multiple hard-coded copies.
4206-
4207-
gnulib-tool: transform hard-coded libgnu.a to $libname.l?a
4208-
* gnulib-tool (func_emit_lib_Makefile_am): transform hard-coded
4209-
`libgnu.a' in Makefile.am snippets to be either `$libname.a' or
4210-
`$libname.la', depending on whether --libtool/--no-libtool options
4211-
were given.
4212-
4213-
2010-10-12 Sam Steingold <[email protected]>
4214-
Gary V. Vaughan <[email protected]>
4215-
4216-
gnulib-tool: transform include guards with `--macro-prefix'
4217-
* gnulib-tool (func_import): support multiple gllib directories:
4218-
headers are generated for each gllib differently, depending on which
4219-
features are actually used, so we need to be able to include all
4220-
these generated headers without fear that one will shadow another,
4221-
so we prepend the macro-prefix before the guard macros.
4222-
42234149
2010-10-11 Bruno Haible <[email protected]>
42244150

42254151
stdlib: Allow multiple gnulib generated replacements to coexist.

gnulib-tool

+1-28
Original file line numberDiff line numberDiff line change
@@ -2815,11 +2815,6 @@ func_emit_lib_Makefile_am ()
28152815
echo
28162816
uses_subdirs=
28172817
{
2818-
if test false = "$libtool"; then
2819-
sed_transform_libgnu_a="s, libgnu\\.a, $libname.a,g"
2820-
else
2821-
sed_transform_libgnu_a="s, libgnu\\.a, $libname.la,g"
2822-
fi
28232818
for module in $modules; do
28242819
func_verify_nontests_module
28252820
if test -n "$module"; then
@@ -2832,7 +2827,6 @@ func_emit_lib_Makefile_am ()
28322827
-e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \
28332828
-e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
28342829
-e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
2835-
-e "$sed_transform_libgnu_a" \
28362830
-e "$sed_transform_check_PROGRAMS"
28372831
if test "$module" = 'alloca'; then
28382832
echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
@@ -2872,8 +2866,6 @@ func_emit_lib_Makefile_am ()
28722866
echo
28732867
if test -z "$makefile_name"; then
28742868
echo "SUBDIRS ="
2875-
echo "nodist_pkginclude_HEADERS ="
2876-
echo "nobase_nodist_pkginclude_HEADERS ="
28772869
echo "noinst_HEADERS ="
28782870
echo "noinst_LIBRARIES ="
28792871
echo "noinst_LTLIBRARIES ="
@@ -2883,7 +2875,6 @@ func_emit_lib_Makefile_am ()
28832875
echo "pkgdata_DATA ="
28842876
fi
28852877
echo "EXTRA_DIST ="
2886-
echo "EXTRA_HEADERS ="
28872878
echo "BUILT_SOURCES ="
28882879
echo "SUFFIXES ="
28892880
fi
@@ -2923,18 +2914,11 @@ func_emit_lib_Makefile_am ()
29232914
&& test -f "$sourcebase/Makefile.am" \
29242915
&& LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *+\{0,1\}= *$libname\\.$libext\$" "$sourcebase/Makefile.am" > /dev/null; \
29252916
}; then
2926-
# Install associated header files, per module Makefile.am snippets.
2927-
sed_transform_HEADERS_primaries="$sed_noop"
29282917
# One of the snippets or the user's Makefile.am already specifies an
29292918
# installation location for the library. Don't confuse automake by saying
29302919
# it should not be installed.
29312920
:
29322921
else
2933-
# Don't install header files when generated library is not installed.
2934-
sed_transform_HEADERS_primaries="\
2935-
/^\(nobase_\)\{0,1\}nodist_pkginclude_HEADERS *=.*$/d
2936-
/^EXTRA_HEADERS *=.*$/d
2937-
"
29382922
# By default, the generated library should not be installed.
29392923
echo "noinst_${perhapsLT}LIBRARIES += $libname.$libext"
29402924
fi
@@ -2966,8 +2950,7 @@ func_emit_lib_Makefile_am ()
29662950
echo
29672951
fi
29682952
cat "$tmp"/allsnippets \
2969-
| sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g' \
2970-
-e "$sed_transform_HEADERS_primaries"
2953+
| sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g'
29712954
echo
29722955
echo "mostlyclean-local: mostlyclean-generic"
29732956
echo " @for dir in '' \$(MOSTLYCLEANDIRS); do \\"
@@ -3181,8 +3164,6 @@ func_emit_tests_Makefile_am ()
31813164
if ! $for_test; then
31823165
echo "check_PROGRAMS ="
31833166
fi
3184-
echo "nodist_pkginclude_HEADERS ="
3185-
echo "nobase_nodist_pkginclude_HEADERS ="
31863167
echo "noinst_HEADERS ="
31873168
echo "noinst_LIBRARIES ="
31883169
if $use_libtests; then
@@ -3198,7 +3179,6 @@ func_emit_tests_Makefile_am ()
31983179
echo "pkgdata_DATA ="
31993180
fi
32003181
echo "EXTRA_DIST ="
3201-
echo "EXTRA_HEADERS ="
32023182
echo "BUILT_SOURCES ="
32033183
echo "SUFFIXES ="
32043184
echo "MOSTLYCLEANFILES = core *.stackdump"
@@ -3867,9 +3847,6 @@ s,^\(.................................................[^ ]*\) *,
38673847
break
38683848
fi
38693849
done
3870-
test -n "${macro_prefix}" && sed_transform_lib_file=$sed_transform_lib_file"
3871-
s/_GL_\(.*\)_H/_${macro_prefix}_GL_\1_H/g
3872-
"
38733850
sed_transform_main_lib_file="$sed_transform_lib_file"
38743851
if test -n "$do_copyrights"; then
38753852
if test -n "$lgpl"; then
@@ -3908,10 +3885,6 @@ s,^\(.................................................[^ ]*\) *,
39083885
s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
39093886
'
39103887
fi
3911-
test -n "${macro_prefix}" \
3912-
&& sed_transform_build_aux_file=$sed_transform_build_aux_file"
3913-
s/_GL_\(.*\)_H/_${macro_prefix}_GL_\1_H/g
3914-
"
39153888

39163889
# Determine script to apply to library files that go into $testsbase/.
39173890
sed_transform_testsrelated_lib_file="$sed_transform_lib_file"

lib/xalloc-die.c

-5
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222

2323
#include <stdlib.h>
2424

25-
#ifndef GNULIB_LIBPOSIX
2625
#include "error.h"
27-
#endif
28-
2926
#include "exitfail.h"
3027

3128
#include "gettext.h"
@@ -34,9 +31,7 @@
3431
void
3532
xalloc_die (void)
3633
{
37-
#ifndef GNULIB_LIBPOSIX
3834
error (exit_failure, 0, "%s", _("memory exhausted"));
39-
#endif
4035

4136
/* The `noreturn' cannot be given to error, since it may return if
4237
its first argument is 0. To help compilers understand the

modules/alloca-opt

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ configure.ac:
1313
gl_FUNC_ALLOCA
1414

1515
Makefile.am:
16-
nodist_pkginclude_HEADERS += $(ALLOCA_H)
17-
EXTRA_HEADERS += alloca.h
18-
1916
BUILT_SOURCES += $(ALLOCA_H)
2017

2118
# We need the following in order to create <alloca.h> when the system

modules/arg-nonnull

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Depends-on:
1212
configure.ac:
1313

1414
Makefile.am:
15-
nodist_pkginclude_HEADERS += arg-nonnull.h
16-
1715
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
1816
# statements but through direct file reference. Therefore this snippet must be
1917
# present in all Makefile.am that need it. This is ensured by the applicability

modules/argz

-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ configure.ac:
1818
gl_FUNC_ARGZ
1919

2020
Makefile.am:
21-
nodist_pkginclude_HEADERS += $(ARGZ_H)
22-
EXTRA_HEADERS += argz.h
23-
2421
BUILT_SOURCES += $(ARGZ_H)
2522

2623
# We need the following in order to create <argz.h> when the system

modules/arpa_inet

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ gl_HEADER_ARPA_INET
1717
AC_PROG_MKDIR_P
1818

1919
Makefile.am:
20-
nobase_nodist_pkginclude_HEADERS += arpa/inet.h
21-
2220
BUILT_SOURCES += arpa/inet.h
2321

2422
# We need the following in order to create <arpa/inet.h> when the system

modules/byteswap

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ configure.ac:
1111
gl_BYTESWAP
1212

1313
Makefile.am:
14-
nodist_pkginclude_HEADERS += $(BYTESWAP_H)
15-
EXTRA_HEADERS += byteswap.h
16-
1714
BUILT_SOURCES += $(BYTESWAP_H)
1815

1916
# We need the following in order to create <byteswap.h> when the system

modules/c++defs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ Depends-on:
1212
configure.ac:
1313

1414
Makefile.am:
15-
nodist_pkginclude_HEADERS += c++defs.h
16-
1715
# The BUILT_SOURCES created by this Makefile snippet are not used via #include
1816
# statements but through direct file reference. Therefore this snippet must be
1917
# present in all Makefile.am that need it. This is ensured by the applicability

modules/ctype

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ configure.ac:
1414
gl_CTYPE_H
1515

1616
Makefile.am:
17-
nodist_pkginclude_HEADERS += ctype.h
18-
1917
BUILT_SOURCES += ctype.h
2018

2119
# We need the following in order to create <ctype.h> when the system

modules/dirent

-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ configure.ac:
1616
gl_DIRENT_H
1717

1818
Makefile.am:
19-
nodist_pkginclude_HEADERS += dirent.h
20-
2119
BUILT_SOURCES += dirent.h
2220

2321
# We need the following in order to create <dirent.h> when the system

modules/errno

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ configure.ac:
1212
gl_HEADER_ERRNO_H
1313

1414
Makefile.am:
15-
nodist_pkginclude_HEADERS += $(ERRNO_H)
16-
EXTRA_HEADERS += errno.h
17-
1815
BUILT_SOURCES += $(ERRNO_H)
1916

2017
# We need the following in order to create <errno.h> when the system

modules/fcntl-h

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ configure.ac:
1818
gl_FCNTL_H
1919

2020
Makefile.am:
21-
nodist_pkginclude_HEADERS += fcntl.h
22-
2321
BUILT_SOURCES += fcntl.h
2422

2523
# We need the following in order to create <fcntl.h> when the system

modules/float

-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ configure.ac:
1212
gl_FLOAT_H
1313

1414
Makefile.am:
15-
nodist_pkginclude_HEADERS += $(FLOAT_H)
16-
EXTRA_HEADERS += float.h
17-
1815
BUILT_SOURCES += $(FLOAT_H)
1916

2017
# We need the following in order to create <float.h> when the system

modules/fnmatch

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ configure.ac:
2424
gl_FUNC_FNMATCH_POSIX
2525

2626
Makefile.am:
27-
nodist_pkginclude_HEADERS += $(FNMATCH_H)
28-
EXTRA_HEADERS += fnmatch.h
29-
3027
BUILT_SOURCES += $(FNMATCH_H)
3128

3229
# We need the following in order to create <fnmatch.h> when the system

modules/getopt-posix

-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ configure.ac:
1919
gl_FUNC_GETOPT_POSIX
2020

2121
Makefile.am:
22-
nodist_pkginclude_HEADERS += $(GETOPT_H)
23-
EXTRA_HEADERS += getopt.h
24-
2522
BUILT_SOURCES += $(GETOPT_H)
2623

2724
# We need the following in order to create <getopt.h> when the system

modules/glob

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ configure.ac:
3030
gl_GLOB
3131

3232
Makefile.am:
33-
nodist_pkginclude_HEADERS += $(GLOB_H)
34-
EXTRA_HEADERS += glob.h
35-
3633
BUILT_SOURCES += $(GLOB_H)
3734

3835
# We need the following in order to create <glob.h> when the system

modules/iconv-h

-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ configure.ac:
1515
gl_ICONV_H
1616

1717
Makefile.am:
18-
nodist_pkginclude_HEADERS += $(ICONV_H)
19-
EXTRA_HEADERS += iconv.h
20-
2118
BUILT_SOURCES += $(ICONV_H)
2219

2320
# We need the following in order to create <iconv.h> when the system

0 commit comments

Comments
 (0)