summaryrefslogtreecommitdiff
path: root/numpy/random
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2017-09-01 10:11:54 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2017-09-01 11:07:15 +0200
commit229d7afc0db9ebc333781cf681c78ea8a8b342aa (patch)
tree67df4d6f4e679f7b12a9dd3d7808d71ff9aff3e8 /numpy/random
parent49e78515a022ac61ce354f20e99cf085e0ee5ece (diff)
downloadnumpy-229d7afc0db9ebc333781cf681c78ea8a8b342aa.tar.gz
MAINT: fix std header include order
Removes _POSIX_C_SOURCE redefine warnings. Standard library headers should always be included last.
Diffstat (limited to 'numpy/random')
-rw-r--r--numpy/random/mtrand/distributions.c4
-rw-r--r--numpy/random/mtrand/randomkit.c26
2 files changed, 16 insertions, 14 deletions
diff --git a/numpy/random/mtrand/distributions.c b/numpy/random/mtrand/distributions.c
index e195700d4..7673f92b4 100644
--- a/numpy/random/mtrand/distributions.c
+++ b/numpy/random/mtrand/distributions.c
@@ -41,10 +41,10 @@
* SOFTWARE OR ITS DOCUMENTATION.
*/
-#include <math.h>
-#include <stdlib.h>
#include "distributions.h"
#include <stdio.h>
+#include <math.h>
+#include <stdlib.h>
#ifndef min
#define min(x,y) ((x<y)?x:y)
diff --git a/numpy/random/mtrand/randomkit.c b/numpy/random/mtrand/randomkit.c
index 3a95efeeb..380917180 100644
--- a/numpy/random/mtrand/randomkit.c
+++ b/numpy/random/mtrand/randomkit.c
@@ -64,13 +64,6 @@
/* static char const rcsid[] =
"@(#) $Jeannot: randomkit.c,v 1.28 2005/07/21 22:14:09 js Exp $"; */
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <limits.h>
-#include <math.h>
-#include <assert.h>
#ifdef _WIN32
/*
@@ -109,18 +102,27 @@
#include <wincrypt.h>
#endif
+/*
+ * Do not move this include. randomkit.h must be included
+ * after windows timeb.h is included.
+ */
+#include "randomkit.h"
+
#else
/* Unix */
+#include "randomkit.h"
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#endif
-/*
- * Do not move this include. randomkit.h must be included
- * after windows timeb.h is included.
- */
-#include "randomkit.h"
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <limits.h>
+#include <math.h>
+#include <assert.h>
#ifndef RK_DEV_URANDOM
#define RK_DEV_URANDOM "/dev/urandom"