|
|
12373f |
diff --git a/misc/fts.c b/misc/fts.c
|
|
|
12373f |
index 9fbefe3..27e9c42 100644
|
|
|
12373f |
--- a/misc/fts.c
|
|
|
12373f |
+++ b/misc/fts.c
|
|
|
12373f |
@@ -61,6 +61,12 @@ static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
|
|
|
12373f |
# define _STAT_VER 0
|
|
|
12373f |
# define __fxstat64(_stat_ver, _fd, _sbp) fstat64((_fd), (_sbp))
|
|
|
12373f |
#endif
|
|
|
12373f |
+#if defined(__CYGWIN__)
|
|
|
12373f |
+# define __errno_location() (&errno)
|
|
|
12373f |
+# define stat64 stat
|
|
|
12373f |
+# define _STAT_VER 0
|
|
|
12373f |
+# define __fxstat64(_stat_ver, _fd, _sbp) fstat((_fd), (_sbp))
|
|
|
12373f |
+#endif
|
|
|
12373f |
#include "system.h"
|
|
|
12373f |
#include <stdlib.h></stdlib.h>
|
|
|
12373f |
#include <string.h></string.h>
|
|
|
12373f |
diff --git a/misc/fts.h b/misc/fts.h
|
|
|
12373f |
index 47c650e..a1ed262 100644
|
|
|
12373f |
--- a/misc/fts.h
|
|
|
12373f |
+++ b/misc/fts.h
|
|
|
12373f |
@@ -53,6 +53,10 @@
|
|
|
12373f |
# define _LARGEFILE64_SOURCE
|
|
|
12373f |
#endif
|
|
|
12373f |
|
|
|
12373f |
+#if defined(__CYGWIN__)
|
|
|
12373f |
+# define _D_EXACT_NAMLEN(d) (strlen ((d)->d_name))
|
|
|
12373f |
+#endif
|
|
|
12373f |
+
|
|
|
12373f |
#if defined(sun)
|
|
|
12373f |
# define _D_EXACT_NAMLEN(d) ((d)->d_reclen)
|
|
|
12373f |
#endif
|
|
|
12373f |
diff --git a/rpmdb.c b/rpmdb.c
|
|
|
12373f |
index 7223fdf..53e95f5 100644
|
|
|
12373f |
--- a/rpmdb.c
|
|
|
12373f |
+++ b/rpmdb.c
|
|
|
12373f |
@@ -5,7 +5,7 @@
|
|
|
12373f |
#include "cliutils.h"
|
|
|
12373f |
#include "debug.h"
|
|
|
12373f |
|
|
|
12373f |
-#if !defined(__GLIBC__) && !defined(__APPLE__)
|
|
|
12373f |
+#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
|
|
|
12373f |
char ** environ = NULL;
|
|
|
12373f |
#endif
|
|
|
12373f |
|
|
|
12373f |
diff --git a/rpmkeys.c b/rpmkeys.c
|
|
|
12373f |
index fa4e4d8..42416d7 100644
|
|
|
12373f |
--- a/rpmkeys.c
|
|
|
12373f |
+++ b/rpmkeys.c
|
|
|
12373f |
@@ -5,7 +5,7 @@
|
|
|
12373f |
#include "cliutils.h"
|
|
|
12373f |
#include "debug.h"
|
|
|
12373f |
|
|
|
12373f |
-#if !defined(__GLIBC__) && !defined(__APPLE__)
|
|
|
12373f |
+#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
|
|
|
12373f |
char ** environ = NULL;
|
|
|
12373f |
#endif
|
|
|
12373f |
|
|
|
12373f |
diff --git a/rpmsign.c b/rpmsign.c
|
|
|
12373f |
index e29864e..868cd78 100644
|
|
|
12373f |
--- a/rpmsign.c
|
|
|
12373f |
+++ b/rpmsign.c
|
|
|
12373f |
@@ -8,7 +8,7 @@
|
|
|
12373f |
#include "cliutils.h"
|
|
|
12373f |
#include "debug.h"
|
|
|
12373f |
|
|
|
12373f |
-#if !defined(__GLIBC__) && !defined(__APPLE__)
|
|
|
12373f |
+#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
|
|
|
12373f |
char ** environ = NULL;
|
|
|
12373f |
#endif
|
|
|
12373f |
|
|
|
12373f |
diff --git a/sign/rpmgensig.c b/sign/rpmgensig.c
|
|
|
12373f |
index 7695ffa..13d7fd9 100644
|
|
|
12373f |
--- a/sign/rpmgensig.c
|
|
|
12373f |
+++ b/sign/rpmgensig.c
|
|
|
12373f |
@@ -22,7 +22,7 @@
|
|
|
12373f |
|
|
|
12373f |
#include "debug.h"
|
|
|
12373f |
|
|
|
12373f |
-#if !defined(__GLIBC__) && !defined(__APPLE__)
|
|
|
12373f |
+#if !defined(__GLIBC__) && !defined(__APPLE__) && !defined(__CYGWIN__)
|
|
|
12373f |
char ** environ = NULL;
|
|
|
12373f |
#endif
|
|
|
12373f |
|
|
|
12373f |
diff --git a/system.h b/system.h
|
|
|
12373f |
index 0037244..5f69d75 100644
|
|
|
12373f |
--- a/system.h
|
|
|
12373f |
+++ b/system.h
|
|
|
12373f |
@@ -119,11 +119,13 @@ typedef char * security_context_t;
|
|
|
12373f |
#define setprogname(pn)
|
|
|
12373f |
#else
|
|
|
12373f |
#define __progname program_name
|
|
|
12373f |
+#if !defined(__CYGWIN__)
|
|
|
12373f |
#define setprogname(pn) \
|
|
|
12373f |
{ if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
|
|
|
12373f |
else __progname = pn; \
|
|
|
12373f |
}
|
|
|
12373f |
#endif
|
|
|
12373f |
+#endif
|
|
|
12373f |
extern const char *__progname;
|
|
|
12373f |
|
|
|
12373f |
/* Take care of NLS matters. */
|