Fixes for building with MSVC.
authorPaul Smith <psmith@gnu.org>
Sun, 29 Sep 2013 17:45:25 +0000 (13:45 -0400)
committerPaul Smith <psmith@gnu.org>
Mon, 30 Sep 2013 04:12:36 +0000 (00:12 -0400)
ChangeLog
gnumake.h
make_msvc_net2003.vcproj
output.c

index 0831076d31be52fbc42e4b78b6e4e8adc251b38b..e21b2c6d266e1841f2322a5984330a98b19ec794 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-09-29  Paul Smith  <psmith@gnu.org>
 
+       * 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 <g.hoogewerf@gmail.com>
+
        * 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.
index 8c622b7f63ee440e44ccaa9f6d66f643e37c0390..dbf303b9b2d5caacc8e7861a2e632fcf1e796b90 100644 (file)
--- 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);
index 956b321ec7725001b7c0d5a486eb8c91358a5d5d..be620ad12fbec2a6fe8fe306dd99691333ffa6ad 100644 (file)
                        <File\r
                                RelativePath=".\job.c">\r
                        </File>\r
+                       <File\r
+                               RelativePath=".\load.c">\r
+                       </File>\r
                        <File\r
                                RelativePath=".\output.c">\r
                        </File>\r
                                <File\r
                                        RelativePath=".\w32\compat\dirent.c">\r
                                </File>\r
+                               <File\r
+                                       RelativePath=".\w32\compat\posixfcn.c">\r
+                               </File>\r
                                <File\r
                                        RelativePath=".\w32\subproc\misc.c">\r
                                        <FileConfiguration\r
index 3cf7afb507b1c505f76728fa374e48466fa8fac3..bb351d349047a82ba7a635fc2515c71865bf128d 100644 (file)
--- a/output.c
+++ b/output.c
@@ -22,7 +22,10 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <assert.h>
 #include <stdio.h>
 #include <stdarg.h>
-#include <unistd.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
 
 #ifdef HAVE_FCNTL_H
 # include <fcntl.h>
@@ -32,6 +35,7 @@ this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #ifdef WINDOWS32
 # include <windows.h>
+# include <io.h>
 # include "sub_proc.h"
 #endif /* WINDOWS32 */