Fossil SCM

Move some posix only includes so they are not used on _WIN32. Can compile again on MinGW.

mgagnon 2013-08-25 03:25 ssh-test-http
Commit 8278a03f0ef162e3dbd8b0b4315ef46eadb64fdf
1 file changed +3 -2
+3 -2
--- src/popen.c
+++ src/popen.c
@@ -17,12 +17,10 @@
1717
**
1818
** This file contains an implementation of a bi-directional popen().
1919
*/
2020
#include "config.h"
2121
#include "popen.h"
22
-#include <signal.h>
23
-#include <sys/wait.h>
2422
2523
#ifdef _WIN32
2624
#include <windows.h>
2725
#include <fcntl.h>
2826
/*
@@ -29,10 +27,13 @@
2927
** Print a fatal error and quit.
3028
*/
3129
static void win32_fatal_error(const char *zMsg){
3230
fossil_fatal("%s", zMsg);
3331
}
32
+#else
33
+#include <signal.h>
34
+#include <sys/wait.h>
3435
#endif
3536
3637
/*
3738
** The following macros are used to cast pointers to integers and
3839
** integers to pointers. The way you do this varies from one compiler
3940
--- src/popen.c
+++ src/popen.c
@@ -17,12 +17,10 @@
17 **
18 ** This file contains an implementation of a bi-directional popen().
19 */
20 #include "config.h"
21 #include "popen.h"
22 #include <signal.h>
23 #include <sys/wait.h>
24
25 #ifdef _WIN32
26 #include <windows.h>
27 #include <fcntl.h>
28 /*
@@ -29,10 +27,13 @@
29 ** Print a fatal error and quit.
30 */
31 static void win32_fatal_error(const char *zMsg){
32 fossil_fatal("%s", zMsg);
33 }
 
 
 
34 #endif
35
36 /*
37 ** The following macros are used to cast pointers to integers and
38 ** integers to pointers. The way you do this varies from one compiler
39
--- src/popen.c
+++ src/popen.c
@@ -17,12 +17,10 @@
17 **
18 ** This file contains an implementation of a bi-directional popen().
19 */
20 #include "config.h"
21 #include "popen.h"
 
 
22
23 #ifdef _WIN32
24 #include <windows.h>
25 #include <fcntl.h>
26 /*
@@ -29,10 +27,13 @@
27 ** Print a fatal error and quit.
28 */
29 static void win32_fatal_error(const char *zMsg){
30 fossil_fatal("%s", zMsg);
31 }
32 #else
33 #include <signal.h>
34 #include <sys/wait.h>
35 #endif
36
37 /*
38 ** The following macros are used to cast pointers to integers and
39 ** integers to pointers. The way you do this varies from one compiler
40

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button