getusershell: don’t depend on fopen-safer
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Nov 2024 21:27:08 +0000 (13:27 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Nov 2024 21:49:37 +0000 (13:49 -0800)
* lib/getusershell.c: Include stdio.h.
[!GNULIB_FOPEN_SAFER]: Don’t include stdio--.h.
* modules/getusershell (Depends-on): Depend on fopen, not fopen-safer.

ChangeLog
lib/getusershell.c
modules/getusershell

index 1e62e9acbf082a96f93fac94f4c5b7ccefd01833..87454b1325a119233beff115b1798a24616d7c0d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2024-11-06  Paul Eggert  <eggert@cs.ucla.edu>
 
+       getusershell: don’t depend on fopen-safer
+       * lib/getusershell.c: Include stdio.h.
+       [!GNULIB_FOPEN_SAFER]: Don’t include stdio--.h.
+       * modules/getusershell (Depends-on): Depend on fopen, not fopen-safer.
+
        savewd: don’t depend on fcntl-safer
        * lib/savewd.c: Don’t include fcntl-safer.
        [GNULIB_FCNTL_SAFER]: Include fcntl--.h.
index 817318327b379f842ced842a0c89762c7ac72197..e86a732dffb2469bdf9b4e98ff8afc66a0f6ce39 100644 (file)
 # endif
 #endif
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
 
-#include "stdio--.h"
 #include "filename.h"
 #include "xalloc.h"
 
+#if GNULIB_FOPEN_SAFER
+# include "stdio--.h"
+#endif
+
 #if ! defined ADDITIONAL_DEFAULT_SHELLS && defined __MSDOS__
 # define ADDITIONAL_DEFAULT_SHELLS \
   "c:/dos/command.com", "c:/windows/command.com", "c:/command.com",
index a4a40852ac8f1e579462fa2d8f41dbdba05c2aae..c9ef576e25e50b14cddc7e1afe4d904e1651a6a3 100644 (file)
@@ -8,7 +8,7 @@ m4/getusershell.m4
 Depends-on:
 unistd
 extensions
-fopen-safer          [test $HAVE_GETUSERSHELL = 0 || test $REPLACE_GETUSERSHELL = 1]
+fopen                [test $HAVE_GETUSERSHELL = 0 || test $REPLACE_GETUSERSHELL = 1]
 getline              [test $HAVE_GETUSERSHELL = 0 || test $REPLACE_GETUSERSHELL = 1]
 filename             [test $HAVE_GETUSERSHELL = 0 || test $REPLACE_GETUSERSHELL = 1]
 xalloc               [test $HAVE_GETUSERSHELL = 0 || test $REPLACE_GETUSERSHELL = 1]