summaryrefslogtreecommitdiff
path: root/lib/argp-namefrob.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/argp-namefrob.h')
-rw-r--r--lib/argp-namefrob.h59
1 files changed, 36 insertions, 23 deletions
diff --git a/lib/argp-namefrob.h b/lib/argp-namefrob.h
index 022b8800ec..fce79222c0 100644
--- a/lib/argp-namefrob.h
+++ b/lib/argp-namefrob.h
@@ -1,19 +1,19 @@
/* Name frobnication for compiling argp outside of glibc
- Copyright (C) 1997-2020 Free Software Foundation, Inc.
+ Copyright (C) 1997-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if !_LIBC
@@ -95,43 +95,56 @@
#undef __vsnprintf
#define __vsnprintf vsnprintf
-#if defined(HAVE_DECL_CLEARERR_UNLOCKED) && !HAVE_DECL_CLEARERR_UNLOCKED
+#if (defined HAVE_DECL_CLEARERR_UNLOCKED && !HAVE_DECL_CLEARERR_UNLOCKED \
+ && !defined clearerr_unlocked)
# define clearerr_unlocked(x) clearerr (x)
#endif
-#if defined(HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED
+#if (defined HAVE_DECL_FEOF_UNLOCKED && !HAVE_DECL_FEOF_UNLOCKED \
+ && !defined feof_unlocked)
# define feof_unlocked(x) feof (x)
#endif
-#if defined(HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED
+#if (defined HAVE_DECL_FERROR_UNLOCKED && !HAVE_DECL_FERROR_UNLOCKED \
+ && !defined ferror_unlocked)
# define ferror_unlocked(x) ferror (x)
#endif
-#if defined(HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED
+#if (defined HAVE_DECL_FFLUSH_UNLOCKED && !HAVE_DECL_FFLUSH_UNLOCKED \
+ && !defined fflush_unlocked)
# define fflush_unlocked(x) fflush (x)
#endif
-#if defined(HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED
+#if (defined HAVE_DECL_FGETS_UNLOCKED && !HAVE_DECL_FGETS_UNLOCKED \
+ && !defined fgets_unlocked)
# define fgets_unlocked(x,y,z) fgets (x,y,z)
#endif
-#if defined(HAVE_DECL_FPUTC_UNLOCKED) && !HAVE_DECL_FPUTC_UNLOCKED
+#if (defined HAVE_DECL_FPUTC_UNLOCKED && !HAVE_DECL_FPUTC_UNLOCKED \
+ && !defined fputc_unlocked)
# define fputc_unlocked(x,y) fputc (x,y)
#endif
-#if defined(HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED
+#if (defined HAVE_DECL_FPUTS_UNLOCKED && !HAVE_DECL_FPUTS_UNLOCKED \
+ && !defined fputs_unlocked)
# define fputs_unlocked(x,y) fputs (x,y)
#endif
-#if defined(HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED
+#if (defined HAVE_DECL_FREAD_UNLOCKED && !HAVE_DECL_FREAD_UNLOCKED \
+ && !defined fread_unlocked)
# define fread_unlocked(w,x,y,z) fread (w,x,y,z)
#endif
-#if defined(HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED
+#if (defined HAVE_DECL_FWRITE_UNLOCKED && !HAVE_DECL_FWRITE_UNLOCKED \
+ && !defined fwrite_unlocked)
# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
#endif
-#if defined(HAVE_DECL_GETC_UNLOCKED) && !HAVE_DECL_GETC_UNLOCKED
+#if (defined HAVE_DECL_GETC_UNLOCKED && !HAVE_DECL_GETC_UNLOCKED \
+ && !defined getc_unlocked)
# define getc_unlocked(x) getc (x)
#endif
-#if defined(HAVE_DECL_GETCHAR_UNLOCKED) && !HAVE_DECL_GETCHAR_UNLOCKED
-# define getchar_unlocked() getchar ()
+#if (defined HAVE_DECL_GETCHAR_UNLOCKED && !HAVE_DECL_GETCHAR_UNLOCKED \
+ && !defined getchar_unlocked)
+# define getchar_unlocked() getchar ()
#endif
-#if defined(HAVE_DECL_PUTC_UNLOCKED) && !HAVE_DECL_PUTC_UNLOCKED
+#if (defined HAVE_DECL_PUTC_UNLOCKED && !HAVE_DECL_PUTC_UNLOCKED \
+ && !defined putc_unlocked)
# define putc_unlocked(x,y) putc (x,y)
#endif
-#if defined(HAVE_DECL_PUTCHAR_UNLOCKED) && !HAVE_DECL_PUTCHAR_UNLOCKED
+#if (defined HAVE_DECL_PUTCHAR_UNLOCKED && !HAVE_DECL_PUTCHAR_UNLOCKED \
+ && !defined putchar_unlocked)
# define putchar_unlocked(x) putchar (x)
#endif
@@ -146,7 +159,7 @@
#elif defined GNULIB_ARGP_EXTERN_BASENAME
extern char *__argp_base_name (const char *arg);
#else
-# include "dirname.h"
+# include "basename-lgpl.h"
# define __argp_base_name last_component
#endif

Return to:

Send suggestions and report system problems to the System administrator.