]> Savannah Git Hosting - gnulib.git/commitdiff
uniname/uniname: Use module 'attribute'.
authorBruno Haible <bruno@clisp.org>
Fri, 8 May 2020 16:09:23 +0000 (18:09 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 8 May 2020 16:41:56 +0000 (18:41 +0200)
* lib/uniname/gen-uninames.lisp: Emit a reference to ATTRIBUTE_PACKED.
* lib/uniname/uninames.h: Regenerated.
* lib/uniname/uniname.c: Include attribute.h.
* modules/uniname/uniname (Depends-on): Add attribute.

ChangeLog
lib/uniname/gen-uninames.lisp
lib/uniname/uniname.c
lib/uniname/uninames.h
modules/uniname/uniname

index 43946e0acfc89f91f2ddbcae9b39aaf70c48ae6e..56c15bce4c59f2a9164085bd169b625c46da23e8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-05-08  Bruno Haible  <bruno@clisp.org>
+
+       uniname/uniname: Use module 'attribute'.
+       * lib/uniname/gen-uninames.lisp: Emit a reference to ATTRIBUTE_PACKED.
+       * lib/uniname/uninames.h: Regenerated.
+       * lib/uniname/uniname.c: Include attribute.h.
+       * modules/uniname/uniname (Depends-on): Add attribute.
+
 2020-05-08  Bruno Haible  <bruno@clisp.org>
 
        c32rtomb: Use module 'attribute'.
index ab46eaed5971fb610cf751aabc3b911d1d7b2e29..38a798f09cf31809a17df419b732232fe053c658 100755 (executable)
             (incf i (length (unicode-char-word-indices uc)))
         ) )
         (format ostream "};~%")
-        (format ostream "static const struct { uint16_t index; uint32_t name:24; }~%")
-        (format ostream "#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)~%__attribute__((__packed__))~%#endif~%")
-        (format ostream "unicode_name_to_index[~D] = {~%"
+        (format ostream "static const struct { uint16_t index; uint32_t name:24; } ATTRIBUTE_PACKED unicode_name_to_index[~D] = {~%"
                         (length all-chars-and-aliases)
         )
         (dolist (uc all-chars-and-aliases)
           (format ostream "~%")
         )
         (format ostream "};~%")
-        (format ostream "static const struct { uint16_t index; uint32_t name:24; }~%")
-        (format ostream "#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)~%__attribute__((__packed__))~%#endif~%")
-        (format ostream "unicode_index_to_name[~D] = {~%"
+        (format ostream "static const struct { uint16_t index; uint32_t name:24; } ATTRIBUTE_PACKED unicode_index_to_name[~D] = {~%"
                         (length all-chars)
         )
         (dolist (uc (sort (copy-list all-chars) #'< :key #'unicode-char-index))
index 6f59bdb062b574ff31439e5fcc225d6f4349772c..7cf1e2e1320b4fc62f2517b7a8aa7fa2ce2a86ec 100644 (file)
@@ -25,6 +25,8 @@
 #include <stdio.h>
 #include <string.h>
 
+#include "attribute.h"
+
 #define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
 
 
index 2906ec98f35e6dfca4087715b35edb63c7ecb178..191b3538e89ef71067996958058ab480dc72c5b4 100644 (file)
@@ -41108,11 +41108,7 @@ static const uint16_t unicode_names[115981] = {
   23557, 15672,
   23563, 15672,
 };
-static const struct { uint16_t index; uint32_t name:24; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-__attribute__((__packed__))
-#endif
-unicode_name_to_index[29282] = {
+static const struct { uint16_t index; uint32_t name:24; } ATTRIBUTE_PACKED unicode_name_to_index[29282] = {
   { 0x1CA1, 0 },
   { 0x2526, 4 },
   { 0x1EB0, 7 },
@@ -70396,11 +70392,7 @@ unicode_name_to_index[29282] = {
   { 0x1F1B, 115977 },
   { 0x1F1A, 115979 },
 };
-static const struct { uint16_t index; uint32_t name:24; }
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
-__attribute__((__packed__))
-#endif
-unicode_index_to_name[29234] = {
+static const struct { uint16_t index; uint32_t name:24; } ATTRIBUTE_PACKED unicode_index_to_name[29234] = {
   { 0x0000, 34710 },
   { 0x0001, 105577 },
   { 0x0002, 101766 },
index 852ba418d6a9305829052e8c32dc53c863d04ab1..bbd8a997dd759b3724c5938f4a8c7032d4ea82a8 100644 (file)
@@ -8,6 +8,7 @@ lib/uniname/uniname.c
 
 Depends-on:
 uniname/base
+attribute
 memcmp
 
 configure.ac: