Added process.h include and check if available through cmake.
* process.h defines getpid on WIN32 systems.
This commit is contained in:
1 parent
0f3b6262cd
commit
870edbffa8
3 files changed
+6
No files matched your search
@@ -209,6 +209,7 @@ CHECK_INCLUDE_FILE(sysent.h HAVE_SYSENT_H)
|
||||
CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
|
||||
CHECK_INCLUDE_FILE(stdbool.h HAVE_STDBOOL_H)
|
||||
CHECK_INCLUDE_FILE(process.h HAVE_PROCESS_H)
|
||||
|
||||
CHECK_FUNCTION_EXISTS(abs HAVE_ABS)
|
||||
CHECK_FUNCTION_EXISTS(memcpy HAVE_MEMCPY)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
#cmakedefine HAVE_DIRENT_H 1
|
||||
#cmakedefine HAVE_STDBOOL_H 1
|
||||
#cmakedefine HAVE_PROCESS_H 1
|
||||
|
||||
#cmakedefine HAVE_ABS 1
|
||||
#cmakedefine HAVE_MEMCPY 1
|
||||
|
||||
@@ -79,6 +79,10 @@
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_PROCESS_H
|
||||
/* process.h defines getpid() function on WIN32 systems */
|
||||
# include <process.h>
|
||||
#endif
|
||||
#ifndef HAVE_GETOPT
|
||||
# include "xgetopt.h"
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user