summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevzero2000 <devzero2000>2011-09-05 11:46:28 +0000
committerdevzero2000 <devzero2000>2011-09-05 11:46:28 +0000
commitf0c843329483d4feb7653215beed2f0dcd2854aa (patch)
treea26959736276d4d33f4a2b3796b7fe47e3e62110
parent3bba412d8d708bfc338242581ce3b6369099783a (diff)
downloadlibpopt-f0c843329483d4feb7653215beed2f0dcd2854aa.tar.gz
devzero2000: merge commit fc8836e from git pull request
https://github.com/devzero2000/POPT/pull/2 "Fix more MSVC build warnings" by asenm (Matt Arsenault). This is the last commit of this patch series and pull request.
-rw-r--r--CHANGES5
-rw-r--r--popt.c1
-rw-r--r--system.h13
3 files changed, 17 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 41c06a6..d886701 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,9 @@
1.17 -> 2.0:
+ - devzero2000: merge commit fc8836e from git pull request
+ https://github.com/devzero2000/POPT/pull/2
+ "Fix more MSVC build warnings"
+ by asenm (Matt Arsenault). This is the last commit
+ of this patch series and pull request.
- devzero2000: merge commit aee9f24 from git pull request
https://github.com/devzero2000/POPT/pull/2
"Add makefile for mingw"
diff --git a/popt.c b/popt.c
index b350faf..adb70b5 100644
--- a/popt.c
+++ b/popt.c
@@ -31,6 +31,7 @@ extern long long int strtoll(const char *nptr, /*@null@*/ char **endptr,
#define assert(_x)
#endif
+
#ifdef MYDEBUG
/*@unchecked@*/
int _popt_debug = 0;
diff --git a/system.h b/system.h
index b072656..72e2b68 100644
--- a/system.h
+++ b/system.h
@@ -3,7 +3,15 @@
*/
#ifdef HAVE_CONFIG_H
-#include "config.h"
+# ifndef _MSC_VER
+# include "config.h"
+# else
+# include "config_msvc.h"
+# endif /* _MSC_VER */
+#endif /* HAVE_CONFIG_H */
+
+#if defined(_MSC_VER) || defined(__MINGW32__)
+# define _CRT_SECURE_NO_WARNINGS 1
#endif
@@ -66,9 +74,9 @@ char *alloca ();
#if defined(_MSC_VER) || defined(__MINGW32__)
-#define _CRT_SECURE_NO_WARNINGS 1
#include <io.h>
#include <malloc.h>
+#include <process.h>
#define F_OK 0
#define R_OK 4
#define W_OK 2
@@ -121,6 +129,7 @@ typedef int ssize_t;
#define open _open
#define close _close
#define lseek _lseek
+#define execvp _execvp
/* Pretend to be root to replace these */
static inline int setuid(UNUSED(int x)) { return 1; }