]> granicus.if.org Git - fortune-mod/commitdiff
util/strfile.*: use uint_* instead of u_int_* doughdemon-master
authorFelix Janda <felix.janda@posteo.de>
Fri, 30 Dec 2016 22:23:38 +0000 (23:23 +0100)
committerFelix Janda <felix.janda@posteo.de>
Fri, 30 Dec 2016 22:23:38 +0000 (23:23 +0100)
Fixes compilation on Solaris and Linux using musl libc.

fortune-mod/util/strfile.8
fortune-mod/util/strfile.h

index a890757f1392578b53d2067ca4b5123a422d3580..9cec71b4b93f719972939f46765f832718b7a15f 100644 (file)
@@ -104,15 +104,15 @@ field to be set.
 The format of the header is:
 .Bd -literal
 #define        VERSION 2
-u_int32_t      str_version;    /* version number */
-u_int32_t      str_numstr;     /* # of strings in the file */
-u_int32_t      str_longlen;    /* length of longest string */
-u_int32_t      str_shortlen;   /* length of shortest string */
+uint32_t       str_version;    /* version number */
+uint32_t       str_numstr;     /* # of strings in the file */
+uint32_t       str_longlen;    /* length of longest string */
+uint32_t       str_shortlen;   /* length of shortest string */
 #define        STR_RANDOM      0x1     /* randomized pointers */
 #define        STR_ORDERED     0x2     /* ordered pointers */
 #define        STR_ROTATED     0x4     /* rot-13'd text */
-u_int32_t      str_flags;      /* bit field for flags */
-u_int8_t       str_delim;      /* delimiting character */
+uint32_t       str_flags;      /* bit field for flags */
+uint8_t        str_delim;      /* delimiting character */
 .Ed
 .Pp
 All fields are written in network byte order.  Each field is also
index 1ff90d45eb1b4231ed6831ff9d144c1f364cf144..517e11579d3a9af5b8cc96d44411fca4319ef64b 100644 (file)
 
 typedef struct {                /* information table */
 #define VERSION     2
-    u_int32_t   str_version;        /* version number */
-    u_int32_t   str_numstr;     /* # of strings in the file */
-    u_int32_t   str_longlen;        /* length of longest string */
-    u_int32_t   str_shortlen;       /* length of shortest string */
+    uint32_t   str_version;        /* version number */
+    uint32_t   str_numstr;     /* # of strings in the file */
+    uint32_t   str_longlen;        /* length of longest string */
+    uint32_t   str_shortlen;       /* length of shortest string */
 #define STR_RANDOM  0x1         /* randomized pointers */
 #define STR_ORDERED 0x2         /* ordered pointers */
 #define STR_ROTATED 0x4         /* rot-13'd text */
-    u_int32_t   str_flags;      /* bit field for flags */
-    u_int8_t    stuff[4];       /* long aligned space */
+    uint32_t   str_flags;      /* bit field for flags */
+    uint8_t    stuff[4];       /* long aligned space */
 #define str_delim   stuff[0]        /* delimiting character */
 } STRFILE;