svn commit: r252826 - head/usr.sbin/ppp
Robert Millan
rmh at FreeBSD.org
Fri Jul 5 19:26:02 UTC 2013
Author: rmh
Date: Fri Jul 5 19:26:01 2013
New Revision: 252826
URL: http://svnweb.freebsd.org/changeset/base/252826
Log:
Remove ancient code for FreeBSD 2.x compatibility.
Reviewed by: brian, freebsd-net
Modified:
head/usr.sbin/ppp/defs.c
head/usr.sbin/ppp/defs.h
Modified: head/usr.sbin/ppp/defs.c
==============================================================================
--- head/usr.sbin/ppp/defs.c Fri Jul 5 19:11:12 2013 (r252825)
+++ head/usr.sbin/ppp/defs.c Fri Jul 5 19:26:01 2013 (r252826)
@@ -43,7 +43,7 @@
#include <sys/module.h>
#endif
#include <termios.h>
-#if !defined(__FreeBSD__) || __FreeBSD__ < 3
+#ifndef __FreeBSD__
#include <time.h>
#endif
#include <unistd.h>
@@ -56,20 +56,11 @@
#define issep(c) ((c) == '\t' || (c) == ' ')
-#if defined(__NetBSD__) || __FreeBSD__ < 3
+#ifdef __NetBSD__
void
randinit()
{
-#if defined(__FreeBSD__)
- static int initdone; /* srandomdev() call is only required once */
-
- if (!initdone) {
- initdone = 1;
- srandomdev();
- }
-#else
srandom((time(NULL)^getpid())+random());
-#endif
}
#endif
Modified: head/usr.sbin/ppp/defs.h
==============================================================================
--- head/usr.sbin/ppp/defs.h Fri Jul 5 19:11:12 2013 (r252825)
+++ head/usr.sbin/ppp/defs.h Fri Jul 5 19:26:01 2013 (r252826)
@@ -117,7 +117,7 @@
#define ROUNDUP(x) ((x) ? (1 + (((x) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#if defined(__NetBSD__) || __FreeBSD__ < 3
+#ifdef __NetBSD__
extern void randinit(void);
#else
#define random arc4random
More information about the svn-src-all
mailing list