Date: Tue, 2 Jul 2013 00:35:32 +0200 From: Robert Millan <rmh@freebsd.org> To: freebsd-net@freebsd.org, brian@freebsd.org Subject: Removing support for FreeBSD 2.x in PPP Message-ID: <CAOfDtXOiZEsyNv0rpXV7MdSFrzkfWd5enrWLQ9j9eH9KopyyhA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi,
Is there any concern if the arcane FreeBSD 2.x build logic is removed from PPP?
These ifdefs are currently being hit when building on GNU/kFreeBSD
(because of __FreeBSD__ value being undefined, i.e. 0).
I guess one could add even more ifdef logic could be added to handle
that, but it seems a bit pointless since 2.x is such an old release
series.
If there is no objection I will check in the attached patch.
--
Robert Millan
[-- Attachment #2 --]
Index: usr.sbin/ppp/defs.c
===================================================================
--- usr.sbin/ppp/defs.c (revision 252490)
+++ usr.sbin/ppp/defs.c (working copy)
@@ -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
Index: usr.sbin/ppp/defs.h
===================================================================
--- usr.sbin/ppp/defs.h (revision 252490)
+++ usr.sbin/ppp/defs.h (working copy)
@@ -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?CAOfDtXOiZEsyNv0rpXV7MdSFrzkfWd5enrWLQ9j9eH9KopyyhA>
