From acd20a2d8df3068d32381978026c427116a2f8b4 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 3 Apr 2021 23:11:43 +0000 Subject: Use 'rand' instead of 'random' on Windows git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4083 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- pm_config.in.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pm_config.in.h') diff --git a/pm_config.in.h b/pm_config.in.h index b30bccfe..7ba51454 100644 --- a/pm_config.in.h +++ b/pm_config.in.h @@ -167,6 +167,16 @@ #define lstat stat #endif +/* Mingw provides much of POSIX, but does not provide 'random' (and a + discussion on the Mingw mailing list in March 2021 shows that the + developers want it that way). MSVCRT itself has a sufficient 'rand', + though, so we use that for 'random'. +*/ +#if MSVCRT +#define random rand +#define srandom srand +#endif + /* CONFIGURE: Netpbm uses __inline__ to declare functions that should be compiled as inline code. GNU C recognizes the __inline__ keyword. If your compiler recognizes any other keyword for this, you can set -- cgit 1.4.1