PERFORCE change 189034 for review

John Baldwin jhb at FreeBSD.org
Tue Feb 22 16:06:18 UTC 2011


http://p4web.freebsd.org/@@189034?ac=10

Change 189034 by jhb at jhb_jhbbsd on 2011/02/22 16:05:23

	Don't use getline() stub on newer FreeBSD versions.

Affected files ...

.. //depot/projects/mcelog/config.c#3 edit

Differences ...

==== //depot/projects/mcelog/config.c#3 (text) ====

@@ -18,6 +18,9 @@
    Author: Andi Kleen 
 */
 #define _GNU_SOURCE 1
+#ifdef __FreeBSD__
+#include <sys/param.h>
+#endif
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -126,11 +129,8 @@
 	return s;
 }
 
-#ifdef __FreeBSD__
-/*
- * Newer versions do have getline(), so this should use a version test
- * at some point.
- */
+#if defined(__FreeBSD__) && __FreeBSD_version < 800067
+/* Provide a stub getline() for older versions of FreeBSD. */
 static ssize_t getline(char **cp, size_t *lenp, FILE *f)
 {
 


More information about the p4-projects mailing list