bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

uchar: Fix error when <uchar.h> is included twice


From: Bruno Haible
Subject: uchar: Fix error when <uchar.h> is included twice
Date: Thu, 18 May 2023 15:39:49 +0200

In a testdir, I'm seeing compilation errors such as:

./uchar.h:509:1: error: redefinition of ‘c32isalnum’
  509 | c32isalnum (wint_t wc)
      | ^~~~~~~~~~
In file included from ../../gllib/mbiter.h:93,
                 from ../../gllib/mbmemcasecmp.c:28:
./uchar.h:509:1: note: previous definition of ‘c32isalnum’ with type 
‘int(wint_t)’ {aka ‘int(unsigned int)’}
  509 | c32isalnum (wint_t wc)
      | ^~~~~~~~~~

This patch fixes it.


2023-05-18  Bruno Haible  <bruno@clisp.org>

        uchar: Fix error when <uchar.h> is included twice.
        * lib/uchar.h: Fix double-inclusion guard.

diff --git a/lib/uchar.in.h b/lib/uchar.in.h
index 8bf6176b8c..f46551d910 100644
--- a/lib/uchar.in.h
+++ b/lib/uchar.in.h
@@ -21,6 +21,7 @@
  */
 
 #ifndef _@GUARD_PREFIX@_UCHAR_H
+#define _@GUARD_PREFIX@_UCHAR_H
 
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@






reply via email to

[Prev in Thread] Current Thread [Next in Thread]