make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU make 3.81rc1 released -- please test.


From: Eli Zaretskii
Subject: Re: GNU make 3.81rc1 released -- please test.
Date: Fri, 24 Feb 2006 13:42:33 +0200

> From: address@hidden
> Date: Sun, 19 Feb 2006 23:25:24 -0500
> Cc: 
> 
> Please find the first release candidate for GNU make 3.81, 3.81rc1,
> available now for download from ftp://alpha.gnu.org/gnu/make:
> 
>   c907a044ebe7dff19f56f8dbb829cd3f  
> ftp://alpha.gnu.org/gnu/make/make-3.81rc1.tar.bz2
>   d9e1fd176b32da0edf5c43b6cca9f493  
> ftp://alpha.gnu.org/gnu/make/make-3.81rc1.tar.gz

I built it on MS-Windows (with the MinGW gcc port).  Please find below
the patches I suggest.  They avoid compiler warnings and fix the
problem in job.c (reported by J. David Bryan <address@hidden>)
whereby a pointer was freed that wasn't malloc'ed.

(Btw, didn't I already send the patch for glob.c some time ago during
the beta testing?  Or did I dream?)


2006-02-24  Eli Zaretskii  <address@hidden>

        * job.c (construct_command_argv_internal): Fix last change.

        * w32/subproc/sub_proc.c (process_pipe_io): Make dwStdin,
        dwStdout, and dwStderr unsigned int: avoids compiler warnings in
        the calls to _beginthreadex.

        * expand.c (recursively_expand_for_file): Initialize `save' to
        prevent compiler warnings.


--- job.c~0     2006-02-20 06:14:01.000000000 +0200
+++ job.c       2006-02-24 13:33:57.828125000 +0200
@@ -2770,8 +2770,13 @@ construct_command_argv_internal (char *l
     /* Some shells do not work well when invoked as 'sh -c xxx' to run a
        command line (e.g. Cygnus GNUWIN32 sh.exe on WIN32 systems).  In these
        cases, run commands via a script file.  */
-    if (just_print_flag)
-      ; /* Do nothing here.  */
+    if (just_print_flag) {
+      /* Need to allocate new_argv, although it's unused, because
+        start_job_command will want to free it and its 0'th element.  */
+      new_argv = (char **) xmalloc(2 * sizeof (char *));
+      new_argv[0] = xstrdup ("");
+      new_argv[1] = NULL;
+    }
     if ((no_default_sh_exe || batch_mode_shell) && batch_filename_ptr) {
       int temp_fd;
       FILE* batch = NULL;


--- w32/subproc/sub_proc.c~0    2006-02-12 02:16:05.000000000 +0200
+++ w32/subproc/sub_proc.c      2006-02-24 13:20:05.906250000 +0200
@@ -685,7 +685,7 @@ process_pipe_io(
        bool_t stdin_eof = FALSE, stdout_eof = FALSE, stderr_eof = FALSE;
        HANDLE childhand = (HANDLE) pproc->pid;
        HANDLE tStdin = NULL, tStdout = NULL, tStderr = NULL;
-       DWORD dwStdin, dwStdout, dwStderr;
+       unsigned dwStdin, dwStdout, dwStderr;
        HANDLE wait_list[4];
        DWORD wait_count;
        DWORD wait_return;
@@ -704,8 +704,8 @@ process_pipe_io(
                pproc->sv_stdin[0] = 0;
        } else {
                tStdin = (HANDLE) _beginthreadex( 0, 1024,
-                       (unsigned (__stdcall *) (void *))proc_stdin_thread, 
pproc, 0,
-                       (unsigned int *) &dwStdin);
+                       (unsigned (__stdcall *) (void *))proc_stdin_thread,
+                                                 pproc, 0, &dwStdin);
                if (tStdin == 0) {
                        pproc->last_err = GetLastError();
                        pproc->lerrno = E_SCALL;
@@ -718,10 +718,10 @@ process_pipe_io(
         */
        tStdout = (HANDLE) _beginthreadex( 0, 1024,
                (unsigned (__stdcall *) (void *))proc_stdout_thread, pproc, 0,
-               (unsigned int *) &dwStdout);
+               &dwStdout);
        tStderr = (HANDLE) _beginthreadex( 0, 1024,
                (unsigned (__stdcall *) (void *))proc_stderr_thread, pproc, 0,
-               (unsigned int *) &dwStderr);
+               &dwStderr);
 
        if (tStdout == 0 || tStderr == 0) {
 

--- expand.c~0  2006-02-20 06:14:01.000000000 +0200
+++ expand.c    2006-02-24 13:04:44.390625000 +0200
@@ -101,7 +101,7 @@ recursively_expand_for_file (struct vari
   char *value;
   const struct floc *this_var;
   const struct floc **saved_varp;
-  struct variable_set_list *save;
+  struct variable_set_list *save = NULL;
   int set_reading = 0;
 
   /* Don't install a new location if this location is empty.


2006-02-24  Eli Zaretskii  <address@hidden>

        * glob.c (my_malloc) [WINDOWS32]: Provide a full ISO C prototype,
        to avoid compiler warnings.


--- glob/glob.c~0       2006-02-12 00:00:39.000000000 +0200
+++ glob/glob.c 2006-02-24 13:10:47.468750000 +0200
@@ -188,12 +188,13 @@ __inline
 # ifndef __SASC
 #  ifdef WINDOWS32
 static void *
+my_realloc (void *p, unsigned int n)
 #  else
 static char *
-# endif
 my_realloc (p, n)
      char *p;
      unsigned int n;
+# endif
 {
   /* These casts are the for sake of the broken Ultrix compiler,
      which warns of illegal pointer combinations otherwise.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]