From: Paul Mackerras Date: Thu, 1 Sep 1994 00:25:35 +0000 (+0000) Subject: use uint32 instead of u_long X-Git-Tag: RELEASE_2_3_6~885 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=9398ab236f55e271a76f803abc07c8b34bf272e3 use uint32 instead of u_long --- diff --git a/pppd/magic.c b/pppd/magic.c index 20dfd6f..18c00bb 100644 --- a/pppd/magic.c +++ b/pppd/magic.c @@ -18,19 +18,19 @@ */ #ifndef lint -static char rcsid[] = "$Id: magic.c,v 1.1 1993/11/11 03:54:25 paulus Exp $"; +static char rcsid[] = "$Id: magic.c,v 1.2 1994/09/01 00:25:19 paulus Exp $"; #endif #include #include #include +#include "pppd.h" #include "magic.h" +static uint32 next; /* Next value to return */ -static u_long next; /* Next value to return */ - -extern u_long gethostid __ARGS((void)); +extern uint32 gethostid __ARGS((void)); extern long random __ARGS((void)); extern void srandom __ARGS((int)); @@ -51,7 +51,7 @@ void magic_init() perror("gettimeofday"); exit(1); } - next ^= (u_long) tv.tv_sec ^ (u_long) tv.tv_usec; + next ^= (uint32) tv.tv_sec ^ (uint32) tv.tv_usec; srandom((int) next); } @@ -60,11 +60,11 @@ void magic_init() /* * magic - Returns the next magic number. */ -u_long magic() +uint32 magic() { - u_long m; + uint32 m; m = next; - next = (u_long) random(); + next = (uint32) random(); return (m); } diff --git a/pppd/magic.h b/pppd/magic.h index d41aa39..4cfa905 100644 --- a/pppd/magic.h +++ b/pppd/magic.h @@ -16,9 +16,9 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: magic.h,v 1.1 1993/11/11 03:54:25 paulus Exp $ + * $Id: magic.h,v 1.2 1994/09/01 00:25:35 paulus Exp $ */ #include "args.h" void magic_init __ARGS((void)); /* Initialize the magic number generator */ -u_long magic __ARGS((void)); /* Returns the next magic number */ +uint32 magic __ARGS((void)); /* Returns the next magic number */