Date: Fri, 5 Jul 2013 19:26:01 +0000 (UTC) From: Robert Millan <rmh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252826 - head/usr.sbin/ppp Message-ID: <201307051926.r65JQ1Ls048979@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307051926.r65JQ1Ls048979>