From 1f4ca0539b32b3f80d5aff2f096e9aebbca5300d Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 29 Sep 2013 13:45:25 -0400 Subject: Fixes for building with MSVC. --- ChangeLog | 5 +++++ gnumake.h | 10 +++++----- make_msvc_net2003.vcproj | 6 ++++++ output.c | 6 +++++- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0831076..e21b2c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2013-09-29 Paul Smith + * output.c: Guard unistd.h inclusion, add io.h. + * gnumake.h: Move GMK_EXPORT before the declarations. + * make_msvc_net2003.vcproj: Add missing files. + Changes for MSVC suggested by Gerte Hoogewerf + * function.c (func_shell_base) [EMX]: Fix EMX support for output-sync. * job.c (child_execute_job) [EMX]: Ditto. * job.h (child_execute_job) [EMX]: Ditto. diff --git a/gnumake.h b/gnumake.h index 8c622b7..dbf303b 100644 --- a/gnumake.h +++ b/gnumake.h @@ -38,17 +38,17 @@ typedef struct #endif /* Free memory returned by the gmk_expand() function. */ -void GMK_EXPORT gmk_free (char *str); +GMK_EXPORT void gmk_free (char *str); /* Allocate memory in GNU make's context. */ -char * GMK_EXPORT gmk_alloc (unsigned int len); +GMK_EXPORT char *gmk_alloc (unsigned int len); /* Run $(eval ...) on the provided string BUFFER. */ -void GMK_EXPORT gmk_eval (const char *buffer, const gmk_floc *floc); +GMK_EXPORT void gmk_eval (const char *buffer, const gmk_floc *floc); /* Run GNU make expansion on the provided string STR. Returns an allocated buffer that the caller must free with gmk_free(). */ -char * GMK_EXPORT gmk_expand (const char *str); +GMK_EXPORT char *gmk_expand (const char *str); /* Register a new GNU make function NAME (maximum of 255 chars long). When the function is expanded in the makefile, FUNC will be invoked with @@ -65,7 +65,7 @@ char * GMK_EXPORT gmk_expand (const char *str); If EXPAND_ARGS is 0, the arguments to the function will not be expanded before FUNC is called. If EXPAND_ARGS is non-0, they will be expanded. */ -void GMK_EXPORT gmk_add_function (const char *name, +GMK_EXPORT void gmk_add_function (const char *name, char *(*func)(const char *nm, int argc, char **argv), int min_args, int max_args, int expand_args); diff --git a/make_msvc_net2003.vcproj b/make_msvc_net2003.vcproj index 956b321..be620ad 100644 --- a/make_msvc_net2003.vcproj +++ b/make_msvc_net2003.vcproj @@ -171,6 +171,9 @@ + + @@ -210,6 +213,9 @@ + + . */ #include #include #include -#include + +#ifdef HAVE_UNISTD_H +# include +#endif #ifdef HAVE_FCNTL_H # include @@ -32,6 +35,7 @@ this program. If not, see . */ #ifdef WINDOWS32 # include +# include # include "sub_proc.h" #endif /* WINDOWS32 */ -- cgit v1.2.3