Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
c39a7125
Commit
c39a7125
authored
Feb 21, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32 build fix
parent
e9f6111b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
mongoose.c
mongoose.c
+13
-4
No files found.
mongoose.c
View file @
c39a7125
...
@@ -948,7 +948,9 @@ void ns_server_free(struct ns_server *s) {
...
@@ -948,7 +948,9 @@ void ns_server_free(struct ns_server *s) {
#include <ctype.h>
#include <ctype.h>
#ifdef _WIN32
#ifdef _WIN32 //////////////// Windows specific defines and includes
#include <io.h> // For _lseeki64
#include <direct.h> // For _mkdir
#ifndef S_ISDIR
#ifndef S_ISDIR
#define S_ISDIR(x) ((x) & _S_IFDIR)
#define S_ISDIR(x) ((x) & _S_IFDIR)
#endif
#endif
...
@@ -964,15 +966,22 @@ void ns_server_free(struct ns_server *s) {
...
@@ -964,15 +966,22 @@ void ns_server_free(struct ns_server *s) {
#define STR(x) STRX(x)
#define STR(x) STRX(x)
#define __func__ __FILE__ ":" STR(__LINE__)
#define __func__ __FILE__ ":" STR(__LINE__)
#endif
#endif
#define INT64_FMT "I64d"
#define stat(x, y) mg_stat((x), (y))
#define fopen(x, y) mg_fopen((x), (y))
#define open(x, y) mg_open((x), (y))
#define flockfile(x) ((void) (x))
#define funlockfile(x) ((void) (x))
typedef
struct
_stati64
file_stat_t
;
typedef
struct
_stati64
file_stat_t
;
#else
typedef
HANDLE
pid_t
;
#else ////////////// UNIX specific defines and includes
#include <dirent.h>
#include <dirent.h>
#include <inttypes.h>
#include <inttypes.h>
#include <pwd.h>
#include <pwd.h>
#define O_BINARY 0
#define O_BINARY 0
#define INT64_FMT PRId64
#define INT64_FMT PRId64
typedef
struct
stat
file_stat_t
;
typedef
struct
stat
file_stat_t
;
#endif
#endif
//////// End of platform-specific defines and includes
#include "mongoose.h"
#include "mongoose.h"
...
@@ -1622,7 +1631,7 @@ static pid_t start_process(char *interp, const char *cmd, const char *env,
...
@@ -1622,7 +1631,7 @@ static pid_t start_process(char *interp, const char *cmd, const char *env,
CloseHandle
(
pi
.
hThread
);
CloseHandle
(
pi
.
hThread
);
CloseHandle
(
pi
.
hProcess
);
CloseHandle
(
pi
.
hProcess
);
return
pi
.
hProcess
;
return
(
pid_t
)
pi
.
hProcess
;
}
}
#else
#else
static
pid_t
start_process
(
const
char
*
interp
,
const
char
*
cmd
,
const
char
*
env
,
static
pid_t
start_process
(
const
char
*
interp
,
const
char
*
cmd
,
const
char
*
env
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment