Project

General

Profile

Feature #2437 » 0003-md5-Fix-non-ANSI-function-definitions.patch

KiBi, 2012-08-15 21:39

View differences:

src/md5.c
110 110

  
111 111
/* MD5 initialization. Begins an MD5 operation, writing a new context.
112 112
 */
113
void li_MD5_Init (context)
114
li_MD5_CTX *context;                                        /* context */
113
void li_MD5_Init (li_MD5_CTX *context)
115 114
{
116 115
  context->count[0] = context->count[1] = 0;
117 116
  /* Load magic initialization constants.
......
126 125
  operation, processing another message block, and updating the
127 126
  context.
128 127
 */
129
void li_MD5_Update (context, _input, inputLen)
130
li_MD5_CTX *context;                                        /* context */
131
const void *_input;                                /* input block */
132
unsigned int inputLen;                     /* length of input block */
128
void li_MD5_Update (li_MD5_CTX *context, const void *_input, unsigned int inputLen)
133 129
{
134 130
  unsigned int i, ndx, partLen;
135 131
  const unsigned char *input = (const unsigned char*) _input;
......
170 166
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
171 167
  the message digest and zeroizing the context.
172 168
 */
173
void li_MD5_Final (digest, context)
174
unsigned char digest[16];                         /* message digest */
175
li_MD5_CTX *context;                                       /* context */
169
void li_MD5_Final (unsigned char digest[16], li_MD5_CTX *context)
176 170
{
177 171
  unsigned char bits[8];
178 172
  unsigned int ndx, padLen;
......
199 193

  
200 194
/* MD5 basic transformation. Transforms state based on block.
201 195
 */
202
static void li_MD5Transform (state, block)
203
UINT4 state[4];
204
const unsigned char block[64];
196
static void li_MD5Transform (UINT4 state[4], const unsigned char block[64])
205 197
{
206 198
  UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
207 199

  
......
294 286
/* Encodes input (UINT4) into output (unsigned char). Assumes len is
295 287
  a multiple of 4.
296 288
 */
297
static void Encode (output, input, len)
298
unsigned char *output;
299
UINT4 *input;
300
unsigned int len;
289
static void Encode (unsigned char *output, UINT4 *input, unsigned int len)
301 290
{
302 291
  unsigned int i, j;
303 292

  
......
312 301
/* Decodes input (unsigned char) into output (UINT4). Assumes len is
313 302
  a multiple of 4.
314 303
 */
315
static void Decode (output, input, len)
316
UINT4 *output;
317
const unsigned char *input;
318
unsigned int len;
304
static void Decode (UINT4 *output, const unsigned char *input, unsigned int len)
319 305
{
320 306
  unsigned int i, j;
321 307

  
......
327 313
/* Note: Replace "for loop" with standard memcpy if possible.
328 314
 */
329 315
#ifndef HAVE_MEMCPY
330
static void MD5_memcpy (output, input, len)
331
POINTER output;
332
POINTER input;
333
unsigned int len;
316
static void MD5_memcpy (POINTER output, POINTER input, unsigned int len)
334 317
{
335 318
  unsigned int i;
336 319

  
......
342 325
/* Note: Replace "for loop" with standard memset if possible.
343 326
 */
344 327
#ifndef HAVE_MEMSET
345
static void MD5_memset (output, value, len)
346
POINTER output;
347
int value;
348
unsigned int len;
328
static void MD5_memset (POINTER output, int value, unsigned int len)
349 329
{
350 330
  unsigned int i;
351 331

  
src/plugin.h
11 11
		static handler_t x(server *srv, connection *con, void *p_d)
12 12

  
13 13
#define INIT_FUNC(x) \
14
		static void *x()
14
		static void *x(void)
15 15

  
16 16
#define FREE_FUNC          SERVER_FUNC
17 17
#define TRIGGER_FUNC       SERVER_FUNC
(3-3/6)