diff -Nur a/gnumake.h b/gnumake.h
--- a/gnumake.h 2013-09-23 17:24:52.000000000 +0200
+++ b/gnumake.h 2013-09-25 15:32:18.274071400 +0200
@@ -29,26 +29,26 @@
#ifdef _WIN32
# ifdef GMK_BUILDING_MAKE
-# define GMK_EXPORT __declspec(dllexport)
+# define GMK_EXPORT(TYPE) __declspec(dllexport) TYPE
# else
-# define GMK_EXPORT __declspec(dllimport)
+# define GMK_EXPORT(TYPE) __declspec(dllimport) TYPE
# endif
#else
-# define GMK_EXPORT
+# define GMK_EXPORT(TYPE) TYPE
#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 @@
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 -Nur a/make_msvc_net2003.vcproj b/make_msvc_net2003.vcproj
--- a/make_msvc_net2003.vcproj 2013-09-23 17:24:52.000000000 +0200
+++ b/make_msvc_net2003.vcproj 2013-09-25 15:22:05.592213600 +0200
@@ -172,6 +172,9 @@
RelativePath=".\job.c">
+
+
+
+
diff -Nur a/output.c b/output.c
--- a/output.c 2013-09-23 17:24:52.000000000 +0200
+++ b/output.c 2013-09-25 15:37:38.434519700 +0200
@@ -22,7 +22,14 @@
#include
#include
#include
-#include
+
+#ifdef HAVE_UNISTD_H
+# include
+#endif
+
+#ifdef _MSC_VER
+# include
+#endif
#ifdef HAVE_FCNTL_H
# include
diff -Nur a/w32/compat/posixfcn.c b/w32/compat/posixfcn.c
--- a/w32/compat/posixfcn.c 2013-09-23 17:24:52.000000000 +0200
+++ b/w32/compat/posixfcn.c 2013-09-25 15:19:16.351976700 +0200
@@ -26,7 +26,7 @@
#include "makeint.h"
#include "job.h"
-#ifdef NO_OUTPUT_SYNC
+#ifndef NO_OUTPUT_SYNC
/* Support for OUTPUT_SYNC and related functionality. */
/* Emulation of fcntl that supports only F_GETFD and F_SETLKW. */