netpbm.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Index: converter/other/jpeg2000/jpeg2ktopam.c
  2. --- converter/other/jpeg2000/jpeg2ktopam.c.orig 2005-05-19 17:29:47 +0200
  3. +++ converter/other/jpeg2000/jpeg2ktopam.c 2006-10-24 08:07:49 +0200
  4. @@ -9,7 +9,6 @@
  5. *****************************************************************************/
  6. #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */
  7. -#define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */
  8. #include <string.h>
  9. #include "pam.h"
  10. Index: converter/other/jpeg2000/pamtojpeg2k.c
  11. --- converter/other/jpeg2000/pamtojpeg2k.c.orig 2005-02-21 04:56:41 +0100
  12. +++ converter/other/jpeg2000/pamtojpeg2k.c 2006-10-24 08:07:49 +0200
  13. @@ -9,7 +9,6 @@
  14. *****************************************************************************/
  15. #define _BSD_SOURCE 1 /* Make sure strdup() is in string.h */
  16. -#define _XOPEN_SOURCE 500 /* Make sure strdup() is in string.h */
  17. #include <string.h>
  18. #include "pam.h"
  19. Index: lib/libpm.c
  20. --- lib/libpm.c.orig 2004-11-20 17:55:27 +0100
  21. +++ lib/libpm.c 2006-10-24 08:07:49 +0200
  22. @@ -617,7 +617,7 @@
  23. pm_openr(const char * const name) {
  24. FILE* f;
  25. - if (strcmp(name, "-") == 0)
  26. + if (name == NULL || strcmp(name, "-") == 0)
  27. f = stdin;
  28. else {
  29. #ifndef VMS
  30. @@ -639,7 +639,7 @@
  31. pm_openw(const char * const name) {
  32. FILE* f;
  33. - if (strcmp(name, "-") == 0)
  34. + if (name == NULL || strcmp(name, "-") == 0)
  35. f = stdout;
  36. else {
  37. #ifndef VMS
  38. Index: lib/pm_gamma.h
  39. --- lib/pm_gamma.h.orig 2004-06-13 00:53:25 +0200
  40. +++ lib/pm_gamma.h 2006-10-24 08:18:26 +0200
  41. @@ -5,7 +5,7 @@
  42. #include <math.h>
  43. -static __inline__ float
  44. +static float
  45. pm_gamma709(float const intensity) {
  46. /* Here are parameters of the gamma transfer function
  47. @@ -34,7 +34,7 @@
  48. -static __inline__ float
  49. +static float
  50. pm_ungamma709(float const brightness) {
  51. /* These are the same parameters as in pm_gamma, above */