[Glibc-bsd-commits] r5370 - in trunk/freebsd-glue: debian include include/sys

rmh at alioth.debian.org rmh at alioth.debian.org
Tue Jan 21 10:47:25 UTC 2014


Author: rmh
Date: 2014-01-21 10:47:25 +0000 (Tue, 21 Jan 2014)
New Revision: 5370

Added:
   trunk/freebsd-glue/include/limits.h
Modified:
   trunk/freebsd-glue/debian/changelog
   trunk/freebsd-glue/include/sys/param.h
Log:
Add PATH_MAX and MAXPATHLEN fallbacks for systems that lack them.

Modified: trunk/freebsd-glue/debian/changelog
===================================================================
--- trunk/freebsd-glue/debian/changelog	2014-01-20 23:29:48 UTC (rev 5369)
+++ trunk/freebsd-glue/debian/changelog	2014-01-21 10:47:25 UTC (rev 5370)
@@ -1,3 +1,9 @@
+freebsd-glue (0.2.18) UNRELEASED; urgency=low
+
+  * Add PATH_MAX and MAXPATHLEN fallbacks for systems that lack them.
+
+ -- Robert Millan <rmh at debian.org>  Tue, 21 Jan 2014 11:47:17 +0100
+
 freebsd-glue (0.2.17) unstable; urgency=low
 
   * Remove dependency on libutil-freebsd-dev (it was only needed during

Added: trunk/freebsd-glue/include/limits.h
===================================================================
--- trunk/freebsd-glue/include/limits.h	                        (rev 0)
+++ trunk/freebsd-glue/include/limits.h	2014-01-21 10:47:25 UTC (rev 5370)
@@ -0,0 +1,10 @@
+#include_next <limits.h>
+
+#ifndef _LIMITS_H_
+#define _LIMITS_H_
+
+#ifndef PATH_MAX
+#define	PATH_MAX	1024
+#endif
+
+#endif

Modified: trunk/freebsd-glue/include/sys/param.h
===================================================================
--- trunk/freebsd-glue/include/sys/param.h	2014-01-20 23:29:48 UTC (rev 5369)
+++ trunk/freebsd-glue/include/sys/param.h	2014-01-21 10:47:25 UTC (rev 5370)
@@ -52,8 +52,8 @@
 #undef __FreeBSD_version
 #define __FreeBSD_version	1000010
 
-/* For SIG* */
-#include <signal.h>
+#include <signal.h>	/* For SIG* */
+#include <limits.h>	/* for PATH_MAX */
 
 #include <sys/types.h>
 
@@ -61,6 +61,10 @@
 #   define		roundup2(x, y)  (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
 #  endif
 
+#ifndef MAXPATHLEN
+#define MAXPATHLEN PATH_MAX
 #endif
 
 #endif
+
+#endif




More information about the Glibc-bsd-commits mailing list