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
639d7a2f
Commit
639d7a2f
authored
Mar 28, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing MinGW compilation: pid_t -> process_id_t
parent
8115ce1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
mongoose.c
mongoose.c
+10
-7
No files found.
mongoose.c
View file @
639d7a2f
...
@@ -1023,7 +1023,7 @@ void ns_server_free(struct ns_server *s) {
...
@@ -1023,7 +1023,7 @@ void ns_server_free(struct ns_server *s) {
#define flockfile(x) ((void) (x))
#define flockfile(x) ((void) (x))
#define funlockfile(x) ((void) (x))
#define funlockfile(x) ((void) (x))
typedef
struct
_stati64
file_stat_t
;
typedef
struct
_stati64
file_stat_t
;
typedef
HANDLE
pid_t
;
typedef
HANDLE
p
rocess_
id_t
;
#else ////////////// UNIX specific defines and includes
#else ////////////// UNIX specific defines and includes
#include <dirent.h>
#include <dirent.h>
#include <dlfcn.h>
#include <dlfcn.h>
...
@@ -1032,6 +1032,7 @@ typedef HANDLE pid_t;
...
@@ -1032,6 +1032,7 @@ typedef HANDLE pid_t;
#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
;
typedef
pid_t
process_id_t
;
#endif //////// End of platform-specific defines and includes
#endif //////// End of platform-specific defines and includes
#include "mongoose.h"
#include "mongoose.h"
...
@@ -1647,8 +1648,9 @@ static void abs_path(const char *utf8_path, char *abs_path, size_t len) {
...
@@ -1647,8 +1648,9 @@ static void abs_path(const char *utf8_path, char *abs_path, size_t len) {
WideCharToMultiByte
(
CP_UTF8
,
0
,
buf2
,
wcslen
(
buf2
)
+
1
,
abs_path
,
len
,
0
,
0
);
WideCharToMultiByte
(
CP_UTF8
,
0
,
buf2
,
wcslen
(
buf2
)
+
1
,
abs_path
,
len
,
0
,
0
);
}
}
static
pid_t
start_process
(
char
*
interp
,
const
char
*
cmd
,
const
char
*
env
,
static
process_id_t
start_process
(
char
*
interp
,
const
char
*
cmd
,
const
char
*
envp
[],
const
char
*
dir
,
sock_t
sock
)
{
const
char
*
env
,
const
char
*
envp
[],
const
char
*
dir
,
sock_t
sock
)
{
STARTUPINFOW
si
=
{
0
};
STARTUPINFOW
si
=
{
0
};
PROCESS_INFORMATION
pi
=
{
0
};
PROCESS_INFORMATION
pi
=
{
0
};
HANDLE
a
[
2
],
b
[
2
],
me
=
GetCurrentProcess
();
HANDLE
a
[
2
],
b
[
2
],
me
=
GetCurrentProcess
();
...
@@ -1708,13 +1710,14 @@ static pid_t start_process(char *interp, const char *cmd, const char *env,
...
@@ -1708,13 +1710,14 @@ 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
(
pid_t
)
pi
.
hProcess
;
return
pi
.
hProcess
;
}
}
#else
#else
static
pid_t
start_process
(
const
char
*
interp
,
const
char
*
cmd
,
const
char
*
env
,
static
process_id_t
start_process
(
const
char
*
interp
,
const
char
*
cmd
,
const
char
*
envp
[],
const
char
*
dir
,
sock_t
sock
)
{
const
char
*
env
,
const
char
*
envp
[],
const
char
*
dir
,
sock_t
sock
)
{
char
buf
[
500
];
char
buf
[
500
];
pid_t
pid
=
fork
();
p
rocess_
id_t
pid
=
fork
();
(
void
)
env
;
(
void
)
env
;
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
...
...
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