]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
intl: Silence warnings "no previous prototype" and "nested extern declaration".
authorBruno Haible <bruno@clisp.org>
Fri, 2 Jun 2023 23:26:37 +0000 (01:26 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 2 Jun 2023 23:26:37 +0000 (01:26 +0200)
* gettext-runtime/intl/gettextP.h (_nl_log_untranslated): New declaration.
* gettext-runtime/intl/dcigettext.c: Remove nested declaration of _nl_log_untranslated.
* gettext-runtime/intl/log.c: Include gettextP.h.

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

index 277bb061fbfb32e1ca89f578cc181c57b4c9cf3f..7c122b1e4ff1ecdffc4af07298fde805f12954c2 100644 (file)
@@ -904,10 +904,6 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
 #ifndef _LIBC
   if (!ENABLE_SECURE)
     {
-      extern void _nl_log_untranslated (const char *logfilename,
-                                       const char *domainname,
-                                       const char *msgid1, const char *msgid2,
-                                       int plural);
       const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
 
       if (logfilename != NULL && logfilename[0] != '\0')
index de34a968cd1593504f7d880c04439cd4bcea36b1..e8e1edd9ad2b6d81ac752d9633575d553e745002 100644 (file)
@@ -292,6 +292,11 @@ extern const char _nl_default_default_domain[] attribute_hidden;
 /* Default text domain in which entries for gettext(3) are to be found.  */
 extern const char *_nl_current_default_domain attribute_hidden;
 
+extern void _nl_log_untranslated (const char *logfilename,
+                                 const char *domainname,
+                                 const char *msgid1, const char *msgid2,
+                                 int plural);
+
 /* @@ begin of epilog @@ */
 
 #endif /* gettextP.h  */
index aea66e86b41a7b34142a45ce6fbea61d9c995da2..ae0e228354838dd67688960711927fd3d3cc8aa2 100644 (file)
@@ -1,5 +1,5 @@
 /* Log file output.
-   Copyright (C) 2003, 2005, 2009, 2021 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2005, 2009, 2021, 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
@@ -20,6 +20,9 @@
 # include <config.h>
 #endif
 
+/* Specification.  */
+#include "gettextP.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>