view patches/netpbm-10.35-glibc-2.10.1-name-conflict.patch @ 6512:ccc20ae889ca default tip guix

mingw::guile-2.0.7 builds.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Thu, 24 Mar 2016 08:03:39 +0100
parents 3e649d2afe5b
children
line wrap: on
line source

--- a/converter/ppm/xpmtoppm.c~	2009-09-13 16:10:07.000000000 +0200
+++ b/converter/ppm/xpmtoppm.c	2009-09-13 16:07:47.000000000 +0200
@@ -121,7 +121,7 @@
 
 
 static void
-getline(char * const line,
+xpmtoppm_getline(char * const line,
         size_t const size,
         FILE * const stream) {
 /*----------------------------------------------------------------------------
@@ -139,7 +139,7 @@
    Exit program if the line doesn't fit in the buffer.
 -----------------------------------------------------------------------------*/
     if (size > sizeof(lastInputLine))
-        pm_error("INTERNAL ERROR: getline() received 'size' parameter "
+        pm_error("INTERNAL ERROR: xpmtoppm_getline() received 'size' parameter "
                  "which is out of bounds");
 
     if (backup) {
@@ -355,7 +355,7 @@
                int * const transparentP) {
 /*----------------------------------------------------------------------------
   Read the header of the XPM file on stream 'stream'.  Assume the
-  getline() stream is presently positioned to the beginning of the
+  xpmtoppm_getline() stream is presently positioned to the beginning of the
   file and it is a Version 3 XPM file.  Leave the stream positioned
   after the header.
 
@@ -386,25 +386,25 @@
     *widthP = *heightP = *ncolorsP = *chars_per_pixelP = -1;
 
     /* Read the XPM signature comment */
-    getline(line, sizeof(line), stream);
+    xpmtoppm_getline(line, sizeof(line), stream);
     if (strncmp(line, xpm3_signature, strlen(xpm3_signature)) != 0) 
         pm_error("Apparent XPM 3 file does not start with '/* XPM */'.  "
                  "First line is '%s'", xpm3_signature);
 
     /* Read the assignment line */
-    getline(line, sizeof(line), stream);
+    xpmtoppm_getline(line, sizeof(line), stream);
     if (strncmp(line, "static char", 11) != 0)
         pm_error("Cannot find data structure declaration.  Expected a "
                  "line starting with 'static char', but found the line "
                  "'%s'.", line);
 
 	/* Read the hints line */
-    getline(line, sizeof(line), stream);
+    xpmtoppm_getline(line, sizeof(line), stream);
     /* skip the comment line if any */
     if (!strncmp(line, "/*", 2)) {
         while (!strstr(line, "*/"))
-            getline(line, sizeof(line), stream);
-        getline(line, sizeof(line), stream);
+            xpmtoppm_getline(line, sizeof(line), stream);
+        xpmtoppm_getline(line, sizeof(line), stream);
     }
     if (sscanf(line, "\"%d %d %d %d\",", widthP, heightP,
                ncolorsP, chars_per_pixelP) != 4)
@@ -438,10 +438,10 @@
         *transparentP = -1;  /* initial value */
 
         for (seqNum = 0; seqNum < *ncolorsP; seqNum++) {
-            getline(line, sizeof(line), stream);
+            xpmtoppm_getline(line, sizeof(line), stream);
             /* skip the comment line if any */
             if (!strncmp(line, "/*", 2))
-                getline(line, sizeof(line), stream);
+                xpmtoppm_getline(line, sizeof(line), stream);
             
             interpretXpm3ColorTableLine(line, seqNum, *chars_per_pixelP, 
                                         *colorsP, *ptabP, transparentP);
@@ -456,7 +456,7 @@
                pixel ** const colorsP, int ** const ptabP) {
 /*----------------------------------------------------------------------------
   Read the header of the XPM file on stream 'stream'.  Assume the
-  getline() stream is presently positioned to the beginning of the
+  xpmtoppm_getline() stream is presently positioned to the beginning of the
   file and it is a Version 1 XPM file.  Leave the stream positioned
   after the header.
   
@@ -475,7 +475,7 @@
     /* Read the initial defines. */
     processedStaticChar = FALSE;
     while (!processedStaticChar) {
-        getline(line, sizeof(line), stream);
+        xpmtoppm_getline(line, sizeof(line), stream);
 
         if (sscanf(line, "#define %s %d", str1, &v) == 2) {
             char *t1;
@@ -523,7 +523,7 @@
     /* If there's a monochrome color table, skip it. */
     if (!strncmp(t1, "mono", 4)) {
         for (;;) {
-            getline(line, sizeof(line), stream);
+            xpmtoppm_getline(line, sizeof(line), stream);
             if (!strncmp(line, "static char", 11))
                 break;
         }
@@ -546,7 +546,7 @@
 
     /* Read color table. */
     for (i = 0; i < *ncolorsP; ++i) {
-        getline(line, sizeof(line), stream);
+        xpmtoppm_getline(line, sizeof(line), stream);
 
         if ((t1 = strchr(line, '"')) == NULL)
             pm_error("D error scanning color table");
@@ -582,7 +582,7 @@
        "static char ...").
     */
     for (;;) {
-        getline(line, sizeof(line), stream);
+        xpmtoppm_getline(line, sizeof(line), stream);
         if (strncmp(line, "static char", 11) == 0)
             break;
     }
@@ -686,7 +686,7 @@
     backup = FALSE;
 
     /* Read the header line */
-    getline(line, sizeof(line), stream);
+    xpmtoppm_getline(line, sizeof(line), stream);
     backup = TRUE;  /* back up so next read reads this line again */
     
     rc = sscanf(line, "/* %s */", str1);
@@ -707,7 +707,7 @@
         pm_error("Could not get %d bytes of memory for image", totalpixels);
     cursor = *dataP;
     maxcursor = *dataP + totalpixels - 1;
-	getline(line, sizeof(line), stream); 
+	xpmtoppm_getline(line, sizeof(line), stream); 
         /* read next line (first line may not always start with comment) */
     while (cursor <= maxcursor) {
         if (strncmp(line, "/*", 2) == 0) {
@@ -717,7 +717,7 @@
                              ncolors, ptab, &cursor, maxcursor);
         }
         if (cursor <= maxcursor)
-            getline(line, sizeof(line), stream);
+            xpmtoppm_getline(line, sizeof(line), stream);
     }
     if (ptab) free(ptab);
 }
--- a/converter/ppm/xvminitoppm.c~	2009-09-13 16:10:22.000000000 +0200
+++ b/converter/ppm/xvminitoppm.c	2009-09-13 16:06:25.000000000 +0200
@@ -52,7 +52,7 @@
 
 
 static void
-getline(FILE * const ifP,
+xpmtoppm_getline(FILE * const ifP,
         char * const buf,
         size_t const size) {
 
@@ -105,7 +105,7 @@
     int rc;
     bool endOfComments;
     
-    getline(ifP, buf, sizeof(buf));
+    xpmtoppm_getline(ifP, buf, sizeof(buf));
 
     if (!STRNEQ(buf, "P7 332", 6))
         pm_error("Input is not a XV thumbnail picture.  It does not "
@@ -113,14 +113,14 @@
 
     endOfComments = FALSE;
     while (!endOfComments) {
-        getline(ifP, buf, sizeof(buf));
+        xpmtoppm_getline(ifP, buf, sizeof(buf));
         if (STRNEQ(buf, "#END_OF_COMMENTS", 16))
             endOfComments = TRUE;
         else if (STRNEQ(buf, "#BUILTIN", 8))
             pm_error("This program does not know how to "
                      "convert builtin XV thumbnail pictures");
     }
-    getline(ifP, buf, sizeof(buf));
+    xpmtoppm_getline(ifP, buf, sizeof(buf));
     rc = sscanf(buf, "%u %u %u", &cols, &rows, &maxval);
     if (rc != 3)
         pm_error("error parsing dimension info '%s'.  "