]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix compilation errors with ISO C 23 compilers.
authorBruno Haible <bruno@clisp.org>
Thu, 9 Feb 2023 15:58:20 +0000 (16:58 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 12 Feb 2023 21:22:14 +0000 (22:22 +0100)
* gettext-runtime/intl/dcigettext.c (getwd, getcwd): Assume a declaration in the
system header files.
* gettext-runtime/intl/gettextP.h (SWAP): Drop K&C compatibility.

gettext-runtime/intl/dcigettext.c
gettext-runtime/intl/gettextP.h

index e7cb9b962a9a6b8e9ccf4a4a249b41517f857f26..666a624b02de4ee78321315c75c6641e79561626 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the internal dcigettext function.
-   Copyright (C) 1995-2021 Free Software Foundation, Inc.
+   Copyright (C) 1995-2023 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -139,13 +139,10 @@ extern int errno;
 # define tfind __tfind
 #else
 # if !defined HAVE_GETCWD
-char *getwd ();
 #  define getcwd(buf, max) getwd (buf)
 # else
 #  if VMS
 #   define getcwd(buf, max) (getcwd) (buf, max, 0)
-#  else
-char *getcwd ();
 #  endif
 # endif
 # ifndef HAVE_STPCPY
index bb00555ee71426f7de7bd481f561512a71e51a42..536e8bd436d1e8ed9a879f641380893208bf1827 100644 (file)
@@ -1,5 +1,5 @@
 /* Header describing internals of libintl library.
-   Copyright (C) 1995-2021 Free Software Foundation, Inc.
+   Copyright (C) 1995-2023 Free Software Foundation, Inc.
    Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
 
    This program is free software: you can redistribute it and/or modify
@@ -113,12 +113,7 @@ extern char *libintl_dcigettext (const char *__domainname,
 # define SWAP(i) bswap_32 (i)
 #else
 static inline nls_uint32
-# ifdef __cplusplus
 SWAP (nls_uint32 i)
-# else
-SWAP (i)
-     nls_uint32 i;
-# endif
 {
   return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
 }