File nsis-2.46-gcc47.patch of Package mingw32-cross-nsis

--- nsis-2.46-src/Source/script.cpp	2009-06-10 23:26:01.000000000 +0200
+++ nsis-2.46-src/Source/script.cpp	2012-08-29 09:30:43.262231601 +0200
@@ -14,6 +14,16 @@
  * warranty.
  */
 
+#ifdef _WIN32
+#  include <direct.h> // for chdir
+#else
+#  include <sys/stat.h> // for stat and umask
+#  include <sys/types.h> // for mode_t
+#  include <fcntl.h> // for O_RDONLY
+#  include <unistd.h>
+#  include <stdlib.h> // for mkstemp
+#endif
+
 #include "Platform.h"
 #include <stdio.h>
 #include <ctype.h>
@@ -37,16 +47,6 @@
 
 using namespace std;
 
-#ifdef _WIN32
-#  include <direct.h> // for chdir
-#else
-#  include <sys/stat.h> // for stat and umask
-#  include <sys/types.h> // for mode_t
-#  include <fcntl.h> // for O_RDONLY
-#  include <unistd.h>
-#  include <stdlib.h> // for mkstemp
-#endif
-
 #define MAX_INCLUDEDEPTH 10
 #define MAX_LINELENGTH 16384
 
@@ -707,7 +707,7 @@
   {
     char *p=str;
     *p=0;
-    fgets(str,MAX_LINELENGTH,fp);
+    if (!fgets(str,MAX_LINELENGTH,fp)) {}
     linecnt++;
     if (feof(fp)&&!str[0]) break;
 
@@ -977,7 +977,7 @@
           char str[MAX_LINELENGTH];
           char *p=str;
           str[0]=0;
-          fgets(str,MAX_LINELENGTH,fp);
+          if (!fgets(str,MAX_LINELENGTH,fp)) {}
           //SCRIPT_MSG("%s%s", str, str[strlen(str)-1]=='\n'?"":"\n");
           if (feof(fp) && !str[0])
           {
@@ -2848,7 +2848,7 @@
           for (;;) {
             char *p=str;
             *p=0;
-            fgets(str,MAX_LINELENGTH,fp);
+            if (!fgets(str,MAX_LINELENGTH,fp)) {}
             linecnt++;
             if (feof(fp)&&!str[0]) break;
 
@@ -2976,7 +2976,7 @@
         }
 #else
         char *execfixed = my_convert(exec);
-        system(execfixed);
+        if (system(execfixed)) {}
         my_convert_free(execfixed);
 #endif
         SCRIPT_MSG("!execute: \"%s\"\n",exec);
@@ -3141,7 +3141,7 @@
             for (;;)
             {
               str[0]=0;
-              fgets(str,sizeof(str),fp);
+              if (!fgets(str,sizeof(str),fp)) {}
               if (!str[0]) break; // eof
 
               char *p=str;
openSUSE Build Service is sponsored by