aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/dspam/musl-fixes.patch
blob: 23c2adf3b8b35e40bf25296d57fd38ebeb2995c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
--- a/src/libdspam.h.orig
+++ b/src/libdspam.h
@@ -51,10 +51,10 @@
 int libdspam_shutdown(void);
 
 DSPAM_CTX * dspam_init	(const char *username, const char *group,
-            const char *home, int operating_mode, u_int32_t flags);
+            const char *home, int operating_mode, uint32_t flags);
 
 DSPAM_CTX * dspam_create (const char *username, const char *group,
-            const char *home, int operating_mode, u_int32_t flags);
+            const char *home, int operating_mode, uint32_t flags);
 
 int dspam_attach  (DSPAM_CTX *CTX, void *dbh);
 int dspam_detach  (DSPAM_CTX *CTX);
--- a/src/libdspam_objects.h.orig
+++ b/src/libdspam_objects.h
@@ -31,17 +31,17 @@
 #include "config_shared.h"
 #include "decode.h"
 
-#if ((defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SUNPRO_C))) && !defined(u_int32_t) && !defined(__BIT_TYPES_DEFINED__)
+#if ((defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SUNPRO_C))) && !defined(uint32_t) && !defined(__BIT_TYPES_DEFINED__)
 #define __BIT_TYPES_DEFINED__
 typedef unsigned long long u_int64_t;
-typedef unsigned int u_int32_t;
+typedef unsigned int uint32_t;
 typedef unsigned short u_int16_t;
 typedef unsigned char u_int8_t;
 #endif
 
 #ifdef _WIN32
-typedef unsigned int u_int32_t;
-typedef u_int32_t uid_t;
+typedef unsigned int uint32_t;
+typedef uint32_t uid_t;
 #endif
 
 extern void *_drv_handle; /* Handle to storage driver library */
@@ -312,8 +312,8 @@
   int		source;		 /* DSS_ */
   int		learned;	 /* Did we actually learn something? */
   int           tokenizer;       /* DSZ_ */
-  u_int32_t	flags;
-  u_int32_t	algorithms;
+  uint32_t	flags;
+  uint32_t	algorithms;
 
   int		result;
   char		class[32];
--- a/src/tokenizer.c.orig
+++ b/src/tokenizer.c
@@ -524,7 +524,7 @@
                       const char *heading, const char *bitpattern)
 {
   int i, t, keylen, breadth;
-  u_int32_t mask;
+  uint32_t mask;
   unsigned long long crc;
   char key[256];
   int active = 0, top, tokenizer = CTX->tokenizer;
@@ -550,7 +550,7 @@
   breadth = _ds_pow2(active);
   
   /* Iterate and generate all keys necessary */
-  for (mask=0; mask < (u_int32_t)breadth; mask++) {
+  for (mask=0; mask < (uint32_t)breadth; mask++) {
     int terms = 0;
 
     key[0] = 0;
@@ -633,7 +633,7 @@
   unsigned long long crc;
   char key[256];
   int active = 0;
-  u_int32_t mask;
+  uint32_t mask;
 
   /* Shift all previous tokens up */
   for(i=0;i<SPARSE_WINDOW_SIZE-1;i++) {
@@ -650,7 +650,7 @@
 
   /* Iterate and generate all keys necessary */
 
-  for(mask=0;mask < (u_int32_t)breadth;mask++) {
+  for(mask=0;mask < (uint32_t)breadth;mask++) {
     int terms = 0;
     t = 0;
 
@@ -960,13 +960,13 @@
 
 char *_ds_generate_bitpattern(int breadth) {
   char *bitpattern;
-  u_int32_t mask;
+  uint32_t mask;
   unsigned long exp;
   int i;
 
   bitpattern = malloc(SPARSE_WINDOW_SIZE * breadth);
 
-  for(mask=0;mask<(u_int32_t)breadth;mask++) {
+  for(mask=0;mask<(uint32_t)breadth;mask++) {
       for(i=0;i<SPARSE_WINDOW_SIZE;i++) {
           exp = (i) ? _ds_pow2(i) : 1;
           /* Reverse pos = SPARSE_WINDOW_SIZE - (i+1); */
--- a/src/libdspam.c.orig
+++ b/src/libdspam.c
@@ -122,7 +122,7 @@
   const char *group,
   const char *home,
   int operating_mode,
-  u_int32_t flags)
+  uint32_t flags)
 {
   DSPAM_CTX *CTX = dspam_create(username, group, home, operating_mode, flags);
 
@@ -159,7 +159,7 @@
   const char *group,
   const char *home,
   int operating_mode,
-  u_int32_t flags)
+  uint32_t flags)
 {
   DSPAM_CTX *CTX;