|
|
@@ -536,10 +536,11 @@ Index: rpmio/Makefile.in
|
|
|
|
|
|
+---------------------------------------------------------------------------
|
|
|
| Add FreeBSD/NetBSD/OpenBSD support.
|
|
|
+| Workaround some GCC'isms.
|
|
|
+---------------------------------------------------------------------------
|
|
|
Index: rpmio/fts.c
|
|
|
--- rpmio/fts.c 18 Jan 2003 16:13:17 -0000 1.1.1.3
|
|
|
-+++ rpmio/fts.c 1 Sep 2003 06:59:34 -0000
|
|
|
++++ rpmio/fts.c 15 Oct 2003 11:48:23 -0000
|
|
|
@@ -34,6 +34,8 @@
|
|
|
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
|
|
|
#endif /* LIBC_SCCS and not lint */
|
|
|
@@ -549,20 +550,34 @@ Index: rpmio/fts.c
|
|
|
#if defined(_LIBC)
|
|
|
#include <sys/param.h>
|
|
|
#include <include/sys/stat.h>
|
|
|
-@@ -58,6 +60,13 @@
|
|
|
- # define dirfd(dirp) -1
|
|
|
+@@ -59,6 +61,13 @@
|
|
|
# define _STAT_VER 0
|
|
|
# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
|
|
|
-+#endif
|
|
|
+ #endif
|
|
|
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
|
|
+# define __errno_location() (&errno)
|
|
|
+# define stat64 stat
|
|
|
+# define _STAT_VER 0
|
|
|
+# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
|
|
|
+# define _D_EXACT_NAMLEN(d) ((d)->d_namlen)
|
|
|
- #endif
|
|
|
++#endif
|
|
|
#include "system.h"
|
|
|
#include "fts.h"
|
|
|
+ #include "rpmio.h"
|
|
|
+@@ -107,9 +116,13 @@
|
|
|
+ /*@modifies fileSystem, internalState @*/;
|
|
|
+
|
|
|
+ #ifndef MAX
|
|
|
++#if defined(__GNUC__)
|
|
|
+ #define MAX(a, b) ({ __typeof__ (a) _a = (a); \
|
|
|
+ __typeof__ (b) _b = (b); \
|
|
|
+ _a > _b ? _a : _b; })
|
|
|
++#else
|
|
|
++#define MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
|
++#endif
|
|
|
+ #endif
|
|
|
+
|
|
|
+ #define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
|
|
|
|
|
|
+---------------------------------------------------------------------------
|
|
|
| Remove inclusion of system <glob.h> because RPM uses its own glob(3)
|