com php-src: Move includes in ps_title.c: sapi/cli/ps _title.c
| From: | Nikita Popov | Date: | Sat, 16 Dec 2017 16:20:05 +0000 |
| Subject: | com php-src: Move includes in ps_title.c: sapi/cli/ps _title.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100613@lists.php.net to get a copy of this message | ||
Commit: 14393b5fb3713fd322fc98d899b14297088a88e9
Author: David Carlier <devnexen@gmail.com> Mon, 2 Oct 2017 13:42:58 +0000
Committer: Nikita Popov <nikita.ppv@gmail.com> Sat, 16 Dec 2017 17:20:05 +0100
Parents: 8a179fa02b50685fba47e7d19af922b07791d616
Branches: PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=14393b5fb3713fd322fc98d899b14297088a88e9
Log:
Move includes in ps_title.c
The HAVE_UNISTD_H check has to be after including config.h.
Also include sys/types.h, which may be needed for setproctitle.
Changed paths:
M sapi/cli/ps_title.c
Diff:
diff --git a/sapi/cli/ps_title.c b/sapi/cli/ps_title.c
index 303115f..7b00348 100644
--- a/sapi/cli/ps_title.c
+++ b/sapi/cli/ps_title.c
@@ -28,16 +28,6 @@
* The following code is adopted from the PostgreSQL's ps_status(.h/.c).
*/
-#include "ps_title.h"
-#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-
#ifdef PHP_WIN32
#include "config.w32.h"
#include <windows.h>
@@ -48,6 +38,17 @@
extern char** environ;
#endif
+#include "ps_title.h"
+#include <stdio.h>
+
+#ifdef HAVE_UNISTD_H
+#include <sys/types.h>
+#include <unistd.h>
+#endif
+
+#include <string.h>
+#include <stdlib.h>
+
#ifdef HAVE_SYS_PSTAT_H
#include <sys/pstat.h> /* for HP-UX */
#endif