From 5d2987e6ca5a7d06b4135ab17314051d363621f2 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 16 May 2024 15:56:47 -0700 Subject: [PATCH] Rename module 'putenv' to 'putenv-gnu'. * modules/putenv-gnu: Renamed from modules/putenv. (Description): Mention the removal of environment variables. * modules/putenv-gnu-tests: Renamed from modules/putenv-tests. * modules/putenv: New file, an indirection to the new module. * doc/posix-functions/putenv.texi: Mention the new module name. * NEWS: Mention the change. --- ChangeLog | 10 +++++++ NEWS | 2 ++ doc/posix-functions/putenv.texi | 4 +-- modules/putenv | 24 +++++---------- modules/putenv-gnu | 34 ++++++++++++++++++++++ modules/{putenv-tests => putenv-gnu-tests} | 0 6 files changed, 56 insertions(+), 18 deletions(-) create mode 100644 modules/putenv-gnu rename modules/{putenv-tests => putenv-gnu-tests} (100%) diff --git a/ChangeLog b/ChangeLog index 8bccdfd2e1..f2bfa4246d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-05-16 Collin Funk + + Rename module 'putenv' to 'putenv-gnu'. + * modules/putenv-gnu: Renamed from modules/putenv. + (Description): Mention the removal of environment variables. + * modules/putenv-gnu-tests: Renamed from modules/putenv-tests. + * modules/putenv: New file, an indirection to the new module. + * doc/posix-functions/putenv.texi: Mention the new module name. + * NEWS: Mention the change. + 2024-05-16 Collin Funk putenv: Add tests. diff --git a/NEWS b/NEWS index 6caf3ad8e1..57540c8375 100644 --- a/NEWS +++ b/NEWS @@ -74,6 +74,8 @@ User visible incompatible changes Date Modules Changes +2024-05-16 putenv This module is renamed to 'putenv-gnu'. + 2024-02-21 *printf-posix These modules no longer support the 'n' directive by default. In order to keep the 'n' directive enabled, you need to additionally request the diff --git a/doc/posix-functions/putenv.texi b/doc/posix-functions/putenv.texi index b0ca4ab8b5..ff06ea5062 100644 --- a/doc/posix-functions/putenv.texi +++ b/doc/posix-functions/putenv.texi @@ -4,7 +4,7 @@ POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/putenv.html} -Gnulib module: --- +Gnulib module: putenv-gnu Portability problems fixed by Gnulib: @itemize @@ -14,6 +14,6 @@ Portability problems not fixed by Gnulib: @itemize @end itemize -Extension: Gnulib provides a module @samp{putenv} that substitutes a +Extension: Gnulib provides a module @samp{putenv-gnu} that substitutes a @code{putenv} implementation that can also be used to remove environment variables. diff --git a/modules/putenv b/modules/putenv index a5a7c8d795..acc0659d8b 100644 --- a/modules/putenv +++ b/modules/putenv @@ -1,28 +1,20 @@ Description: putenv() function: change or add an environment variable. +Status: +deprecated + +Notice: +This module is deprecated. Use the module 'putenv-gnu' instead. + Files: -lib/putenv.c -m4/putenv.m4 Depends-on: -stdlib -environ [test $REPLACE_PUTENV = 1] -free-posix [test $REPLACE_PUTENV = 1] -malloc-posix [test $REPLACE_PUTENV = 1] +putenv-gnu configure.ac: -gl_FUNC_PUTENV -gl_CONDITIONAL([GL_COND_OBJ_PUTENV], [test $REPLACE_PUTENV = 1]) -AM_COND_IF([GL_COND_OBJ_PUTENV], [ - gl_PREREQ_PUTENV -]) -gl_STDLIB_MODULE_INDICATOR([putenv]) Makefile.am: -if GL_COND_OBJ_PUTENV -lib_SOURCES += putenv.c -endif Include: @@ -31,4 +23,4 @@ License: LGPL Maintainer: -Jim Meyering, glibc +all diff --git a/modules/putenv-gnu b/modules/putenv-gnu new file mode 100644 index 0000000000..be929f60be --- /dev/null +++ b/modules/putenv-gnu @@ -0,0 +1,34 @@ +Description: +putenv() function: change, add, or remove an environment variable. + +Files: +lib/putenv.c +m4/putenv.m4 + +Depends-on: +stdlib +environ [test $REPLACE_PUTENV = 1] +free-posix [test $REPLACE_PUTENV = 1] +malloc-posix [test $REPLACE_PUTENV = 1] + +configure.ac: +gl_FUNC_PUTENV +gl_CONDITIONAL([GL_COND_OBJ_PUTENV], [test $REPLACE_PUTENV = 1]) +AM_COND_IF([GL_COND_OBJ_PUTENV], [ + gl_PREREQ_PUTENV +]) +gl_STDLIB_MODULE_INDICATOR([putenv]) + +Makefile.am: +if GL_COND_OBJ_PUTENV +lib_SOURCES += putenv.c +endif + +Include: + + +License: +LGPL + +Maintainer: +Jim Meyering, glibc diff --git a/modules/putenv-tests b/modules/putenv-gnu-tests similarity index 100% rename from modules/putenv-tests rename to modules/putenv-gnu-tests -- 2.39.5