Alexandre Julliard : libport: Don't build some functions that aren' t needed on Windows.

Alexandre Julliard julliard at winehq.org
Thu Mar 14 18:33:22 CDT 2019


Module: wine
Branch: master
Commit: fb4c12770528d5a1614fb75d6a44f2080005140f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=fb4c12770528d5a1614fb75d6a44f2080005140f

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Mar 14 16:13:23 2019 +0100

libport: Don't build some functions that aren't needed on Windows.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/wine/port.h  | 48 ++++++++++++++++++++++++------------------------
 libs/port/isfinite.c |  2 +-
 libs/port/isinf.c    |  2 +-
 libs/port/isnan.c    |  2 +-
 libs/port/spawn.c    |  2 +-
 5 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/include/wine/port.h b/include/wine/port.h
index dc97d71..d23e2b0 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -86,6 +86,30 @@ typedef int ssize_t;
 #  endif
 #endif
 
+#ifndef HAVE_ISFINITE
+int isfinite(double x);
+#endif
+
+#ifndef HAVE_ISINF
+int isinf(double x);
+#endif
+
+#ifndef HAVE_ISNAN
+int isnan(double x);
+#endif
+
+/* Process creation flags */
+#ifndef _P_WAIT
+# define _P_WAIT    0
+# define _P_NOWAIT  1
+# define _P_OVERLAY 2
+# define _P_NOWAITO 3
+# define _P_DETACH  4
+#endif
+#ifndef HAVE__SPAWNVP
+extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
+#endif
+
 #endif  /* _WIN32 */
 
 /****************************************************************
@@ -237,18 +261,6 @@ extern int getopt_long_only (int ___argc, char *const *___argv,
 int ffs( int x );
 #endif
 
-#ifndef HAVE_ISFINITE
-int isfinite(double x);
-#endif
-
-#ifndef HAVE_ISINF
-int isinf(double x);
-#endif
-
-#ifndef HAVE_ISNAN
-int isnan(double x);
-#endif
-
 #ifndef HAVE_LLRINT
 __int64 llrint(double x);
 #endif
@@ -323,18 +335,6 @@ int usleep (unsigned int useconds);
 
 extern int mkstemps(char *template, int suffix_len);
 
-/* Process creation flags */
-#ifndef _P_WAIT
-# define _P_WAIT    0
-# define _P_NOWAIT  1
-# define _P_OVERLAY 2
-# define _P_NOWAITO 3
-# define _P_DETACH  4
-#endif
-#ifndef HAVE__SPAWNVP
-extern int _spawnvp(int mode, const char *cmdname, const char * const argv[]);
-#endif
-
 /* Interlocked functions */
 
 #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
diff --git a/libs/port/isfinite.c b/libs/port/isfinite.c
index 26b5a37..b1ce304 100644
--- a/libs/port/isfinite.c
+++ b/libs/port/isfinite.c
@@ -21,7 +21,7 @@
 #include "config.h"
 #include "wine/port.h"
 
-#ifndef HAVE_ISFINITE
+#if !defined(HAVE_ISFINITE) && !defined(isfinite)
 
 #ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
diff --git a/libs/port/isinf.c b/libs/port/isinf.c
index e0c35ad..89f62c9 100644
--- a/libs/port/isinf.c
+++ b/libs/port/isinf.c
@@ -21,7 +21,7 @@
 #include "config.h"
 #include "wine/port.h"
 
-#ifndef HAVE_ISINF
+#if !defined(HAVE_ISINF) && !defined(isinf)
 
 #ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
diff --git a/libs/port/isnan.c b/libs/port/isnan.c
index b2a1be6..e98875c 100644
--- a/libs/port/isnan.c
+++ b/libs/port/isnan.c
@@ -21,7 +21,7 @@
 #include "config.h"
 #include "wine/port.h"
 
-#ifndef HAVE_ISNAN
+#if !defined(HAVE_ISNAN) && !defined(isnan)
 
 #ifdef HAVE_IEEEFP_H
 #include <ieeefp.h>
diff --git a/libs/port/spawn.c b/libs/port/spawn.c
index 97364e7..9292005 100644
--- a/libs/port/spawn.c
+++ b/libs/port/spawn.c
@@ -21,7 +21,7 @@
 #include "config.h"
 #include "wine/port.h"
 
-#ifndef HAVE__SPAWNVP
+#if !defined(HAVE__SPAWNVP) && !defined(_WIN32)
 
 #include <errno.h>
 #include <signal.h>




More information about the wine-cvs mailing list