From 877641742255c9eeb82438eb54fd772f65e61e84 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Thu, 8 Apr 2021 02:13:49 +0000 Subject: Release 10.94.02 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4084 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- doc/HISTORY | 9 +++++++++ lib/util/randsysrandom.c | 5 +++++ other/Makefile | 4 ++++ pm_config.in.h | 10 ++++++++++ version.mk | 2 +- 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/doc/HISTORY b/doc/HISTORY index 8a92830b..51f2ef8b 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,15 @@ Netpbm. CHANGE HISTORY -------------- +21.04.08 BJH Release 10.94.02 + + Build: Fix build failure due to missing 'random' function on + Mingw platform. Bug introduced in Netpbm 10.94 (March 2021). + + Build: Don't attempt to build 'pamexec' on systems without + Unix process management. Bug introduced in Netpbm 10.94 + (March 2021). + 21.03.30 BJH Release 10.94.01 Add missing test files. diff --git a/lib/util/randsysrandom.c b/lib/util/randsysrandom.c index 3e38b0ae..f26bb18d 100644 --- a/lib/util/randsysrandom.c +++ b/lib/util/randsysrandom.c @@ -1,9 +1,14 @@ +/* Implementation note: Mingw/Windows does not provide POSIX 'random', so + netpbm/pm_config.h makes that a macro for POSIX 'rand' on that platform +*/ + #define _DEFAULT_SOURCE /* New name for SVID & BSD source defines */ #define _XOPEN_SOURCE 500 /* Make sure random() is in stdlib.h */ #define _BSD_SOURCE /* Make sure random() is in stdlib.h */ #include +#include "netpbm/pm_config.h" #include "netpbm/rand.h" static void diff --git a/other/Makefile b/other/Makefile index aa0d75bb..60ceb71b 100644 --- a/other/Makefile +++ b/other/Makefile @@ -28,6 +28,10 @@ PORTBINARIES = pamarith pambayer pamchannel pamdepth \ pamstack pamsummcol pamunlookup pamvalidate pnmcolormap \ ppmdcfont ppmddumpfont ppmdmkfont +ifneq ($(DONT_HAVE_PROCESS_MGMT),Y) + PORTBINARIES += pamexec +endif + ifneq ($(LINUXSVGALIB),NONE) PORTBINARIES += ppmsvgalib endif 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 diff --git a/version.mk b/version.mk index d845e480..60aa3d2f 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 10 NETPBM_MINOR_RELEASE = 94 -NETPBM_POINT_RELEASE = 1 +NETPBM_POINT_RELEASE = 2 -- cgit 1.4.1