bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

free-posix: New module, renamed from 'free'


From: Bruno Haible
Subject: free-posix: New module, renamed from 'free'
Date: Sat, 19 Dec 2020 00:22:56 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

Now that the 'free' module deals only with the errno issue, that is, with a
difference between the ISO C and the (future) POSIX standards, a better name
is 'free-posix'. Just like we have modules
  fprintf-posix
  system-posix
(without having modules 'fprintf' and 'system').


2020-12-18  Bruno Haible  <bruno@clisp.org>

        free-posix: New module, renamed from 'free'.
        * modules/free-posix: Renamed from modules/free.
        (configure.ac): Update gl_STDLIB_MODULE_INDICATOR invocation.
        * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize GNULIB_FREE_POSIX,
        not GNULIB_FREE.
        * modules/stdlib (Makefile.am): Substitute GNULIB_FREE_POSIX, not
        GNULIB_FREE.
        * lib/stdlib.in.h (free): Test GNULIB_FREE_POSIX, not GNULIB_FREE.
        * doc/posix-functions/free.texi: Mention the module 'free-posix' and
        what it does.
        * NEWS: Mention that module 'free' no longer exists.
        * modules/canonicalize (Depends-on): Add free-posix. Remove free.
        * modules/canonicalize-lgpl (Depends-on): Likewise.

diff --git a/NEWS b/NEWS
index 09d1987..7679be0 100644
--- a/NEWS
+++ b/NEWS
@@ -60,6 +60,8 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2020-12-18  free            This module, obsoleted in 2008, is gone.
+
 2020-12-14  findprog-in     The function 'find_in_given_path' now takes a 3rd
                             argument 'const char *directory'. To maintain the
                             previous behaviour, insert NULL as additional 3rd
diff --git a/doc/posix-functions/free.texi b/doc/posix-functions/free.texi
index 1c397d1..a7ceec1 100644
--- a/doc/posix-functions/free.texi
+++ b/doc/posix-functions/free.texi
@@ -4,10 +4,12 @@
 
 POSIX specification:@* 
@url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/free.html}
 
-Gnulib module: free
+Gnulib module: free-posix
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function may clobber @code{errno} on many platforms.
 @end itemize
 
 Portability problems not fixed by Gnulib:
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index a512459..1964443 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -284,7 +284,7 @@ _GL_CXXALIAS_SYS (fcvt, char *,
 _GL_CXXALIASWARN (fcvt);
 #endif
 
-#if @GNULIB_FREE@
+#if @GNULIB_FREE_POSIX@
 # if @REPLACE_FREE@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   undef free
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
index 6b519c4..7e03b9a 100644
--- a/m4/stdlib_h.m4
+++ b/m4/stdlib_h.m4
@@ -1,4 +1,4 @@
-# stdlib_h.m4 serial 53
+# stdlib_h.m4 serial 54
 dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -62,7 +62,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
   GNULIB_ATOLL=0;         AC_SUBST([GNULIB_ATOLL])
   GNULIB_CALLOC_POSIX=0;  AC_SUBST([GNULIB_CALLOC_POSIX])
   GNULIB_CANONICALIZE_FILE_NAME=0;  AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
-  GNULIB_FREE=0;          AC_SUBST([GNULIB_FREE])
+  GNULIB_FREE_POSIX=0;    AC_SUBST([GNULIB_FREE_POSIX])
   GNULIB_GETLOADAVG=0;    AC_SUBST([GNULIB_GETLOADAVG])
   GNULIB_GETSUBOPT=0;     AC_SUBST([GNULIB_GETSUBOPT])
   GNULIB_GRANTPT=0;       AC_SUBST([GNULIB_GRANTPT])
diff --git a/modules/canonicalize b/modules/canonicalize
index 4853cf9..e1b7607 100644
--- a/modules/canonicalize
+++ b/modules/canonicalize
@@ -13,7 +13,7 @@ errno
 extensions
 file-set
 filename
-free
+free-posix
 getcwd
 hash-triple-simple
 idx
diff --git a/modules/canonicalize-lgpl b/modules/canonicalize-lgpl
index d4dfcc9..e94a898 100644
--- a/modules/canonicalize-lgpl
+++ b/modules/canonicalize-lgpl
@@ -13,7 +13,7 @@ nocrash
 double-slash-root [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
 errno             [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
 filename          [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
-free              [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
+free-posix        [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
 idx               [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
 libc-config       [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
 malloc-posix      [test $HAVE_CANONICALIZE_FILE_NAME = 0 || test 
$REPLACE_CANONICALIZE_FILE_NAME = 1]
diff --git a/modules/free b/modules/free-posix
similarity index 87%
rename from modules/free
rename to modules/free-posix
index 29ec637..f48e388 100644
--- a/modules/free
+++ b/modules/free-posix
@@ -14,7 +14,7 @@ if test $REPLACE_FREE = 1; then
   AC_LIBOBJ([free])
   gl_PREREQ_FREE
 fi
-gl_STDLIB_MODULE_INDICATOR([free])
+gl_STDLIB_MODULE_INDICATOR([free-posix])
 
 Makefile.am:
 
diff --git a/modules/stdlib b/modules/stdlib
index 1daa0f9..68583f8 100644
--- a/modules/stdlib
+++ b/modules/stdlib
@@ -36,7 +36,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) \
              -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \
              -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \
              -e 
's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \
-             -e 's/@''GNULIB_FREE''@/$(GNULIB_FREE)/g' \
+             -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \
              -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \
              -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \
              -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]