Commit d5d91869372f50d755cfa66803a52eece02dee43

Guillem Jover 2012-01-03T09:08:35

Base fpurge() implementation on __fpurge presence instead of glibc

diff --git a/configure.ac b/configure.ac
index fd8b5d7..0304f57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,7 +54,7 @@ AC_LINK_IFELSE(
 	 AC_MSG_RESULT([yes])],
 	[AC_MSG_RESULT([no])])
 
-AC_CHECK_FUNCS([dirfd getexecname getline sysconf])
+AC_CHECK_FUNCS([dirfd __fpurge getexecname getline sysconf])
 
 AC_CONFIG_FILES([
 	Makefile
diff --git a/src/fpurge.c b/src/fpurge.c
index 051b625..e2483f2 100644
--- a/src/fpurge.c
+++ b/src/fpurge.c
@@ -28,7 +28,7 @@
 #include <stdio.h>
 #include <stdio_ext.h>
 
-#ifdef __GLIBC__
+#ifdef HAVE___FPURGE
 int
 fpurge(FILE *fp)
 {