netpbm/netpbm.patch

changeset 54
f012bbb2a542
child 55
35f87223d24d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netpbm/netpbm.patch	Fri Jan 09 01:40:36 2009 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +Index: converter/other/jpeg2000/jpeg2ktopam.c
     1.5 +--- converter/other/jpeg2000/jpeg2ktopam.c.orig	2005-05-19 17:29:47 +0200
     1.6 ++++ converter/other/jpeg2000/jpeg2ktopam.c	2006-10-24 08:07:49 +0200
     1.7 +@@ -9,7 +9,6 @@
     1.8 + *****************************************************************************/
     1.9 + 
    1.10 + #define _BSD_SOURCE 1      /* Make sure strdup() is in string.h */
    1.11 +-#define _XOPEN_SOURCE 500  /* Make sure strdup() is in string.h */
    1.12 + #include <string.h>
    1.13 + 
    1.14 + #include "pam.h"
    1.15 +Index: converter/other/jpeg2000/pamtojpeg2k.c
    1.16 +--- converter/other/jpeg2000/pamtojpeg2k.c.orig	2005-02-21 04:56:41 +0100
    1.17 ++++ converter/other/jpeg2000/pamtojpeg2k.c	2006-10-24 08:07:49 +0200
    1.18 +@@ -9,7 +9,6 @@
    1.19 + *****************************************************************************/
    1.20 + 
    1.21 + #define _BSD_SOURCE 1    /* Make sure strdup() is in string.h */
    1.22 +-#define _XOPEN_SOURCE 500  /* Make sure strdup() is in string.h */
    1.23 + #include <string.h>
    1.24 + 
    1.25 + #include "pam.h"
    1.26 +Index: lib/libpm.c
    1.27 +--- lib/libpm.c.orig	2004-11-20 17:55:27 +0100
    1.28 ++++ lib/libpm.c	2006-10-24 08:07:49 +0200
    1.29 +@@ -617,7 +617,7 @@
    1.30 + pm_openr(const char * const name) {
    1.31 +     FILE* f;
    1.32 + 
    1.33 +-    if (strcmp(name, "-") == 0)
    1.34 ++    if (name == NULL || strcmp(name, "-") == 0)
    1.35 +         f = stdin;
    1.36 +     else {
    1.37 + #ifndef VMS
    1.38 +@@ -639,7 +639,7 @@
    1.39 + pm_openw(const char * const name) {
    1.40 +     FILE* f;
    1.41 + 
    1.42 +-    if (strcmp(name, "-") == 0)
    1.43 ++    if (name == NULL || strcmp(name, "-") == 0)
    1.44 +         f = stdout;
    1.45 +     else {
    1.46 + #ifndef VMS
    1.47 +Index: lib/pm_gamma.h
    1.48 +--- lib/pm_gamma.h.orig	2004-06-13 00:53:25 +0200
    1.49 ++++ lib/pm_gamma.h	2006-10-24 08:18:26 +0200
    1.50 +@@ -5,7 +5,7 @@
    1.51 + 
    1.52 + #include <math.h>
    1.53 + 
    1.54 +-static __inline__ float
    1.55 ++static float
    1.56 + pm_gamma709(float const intensity) {
    1.57 + 
    1.58 +     /* Here are parameters of the gamma transfer function
    1.59 +@@ -34,7 +34,7 @@
    1.60 + 
    1.61 + 
    1.62 + 
    1.63 +-static __inline__ float
    1.64 ++static float
    1.65 + pm_ungamma709(float const brightness) {
    1.66 + 
    1.67 +     /* These are the same parameters as in pm_gamma, above */

mercurial