From c7ba1223c3be25e7a982212bdc59649aa8c59439 Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Tue, 30 May 2006 01:55:42 +0000 Subject: [PATCH] app/errors.c app/main.c app/file/gimprecentlist.c libgimp/gimp.c 2006-05-29 Manish Singh * app/errors.c * app/main.c * app/file/gimprecentlist.c * libgimp/gimp.c * libgimpbase/gimpsignal.c * modules/cdisplay_lcms.c * modules/cdisplay_proof.c * modules/controller_midi.c * plug-ins/common/gqbist.c * plug-ins/metadata/xmp-schemas.h: miscellaneous fixes for building with -ansi -pedantic. Mostly #define _FOO_SOURCE stuff. Thanks to Daniel Richard G. for the patch. Fixes bug #342390. --- ChangeLog | 15 +++++++++++++++ app/errors.c | 2 ++ app/file/gimprecentlist.c | 2 ++ app/main.c | 3 +++ libgimp/gimp.c | 3 +++ libgimpbase/gimpsignal.c | 2 +- modules/cdisplay_lcms.c | 2 ++ modules/cdisplay_proof.c | 2 ++ modules/controller_midi.c | 2 ++ plug-ins/common/gqbist.c | 7 +++++-- plug-ins/metadata/xmp-schemas.h | 2 +- 11 files changed, 38 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b12b20626..1d45dbe057 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2006-05-29 Manish Singh + + * app/errors.c + * app/main.c + * app/file/gimprecentlist.c + * libgimp/gimp.c + * libgimpbase/gimpsignal.c + * modules/cdisplay_lcms.c + * modules/cdisplay_proof.c + * modules/controller_midi.c + * plug-ins/common/gqbist.c + * plug-ins/metadata/xmp-schemas.h: miscellaneous fixes for building + with -ansi -pedantic. Mostly #define _FOO_SOURCE stuff. Thanks to + Daniel Richard G. for the patch. Fixes bug #342390. + 2006-05-30 Tor Lillqvist * libgimpwidgets/gimpwidgets.def: Sync. diff --git a/app/errors.c b/app/errors.c index 9d410078e2..5c46284eaa 100644 --- a/app/errors.c +++ b/app/errors.c @@ -18,6 +18,8 @@ #include "config.h" +#define _POSIX_SOURCE /* need the POSIX signal API */ + #include #include #include diff --git a/app/file/gimprecentlist.c b/app/file/gimprecentlist.c index d378c83e9d..e2950e8769 100644 --- a/app/file/gimprecentlist.c +++ b/app/file/gimprecentlist.c @@ -26,6 +26,8 @@ #include "config.h" +#define _SVID_SOURCE /* need lockf() and F_TLOCK/F_ULOCK */ + #include #include #include diff --git a/app/main.c b/app/main.c index f52f6a81ec..9e0d4787a5 100644 --- a/app/main.c +++ b/app/main.c @@ -18,6 +18,9 @@ #include "config.h" +#define _POSIX_SOURCE /* all the sigaction stuff is POSIX */ +#define _SVID_SOURCE /* except for SA_RESTART, it seems */ + #include #include #include diff --git a/libgimp/gimp.c b/libgimp/gimp.c index 71db405368..451c16b31a 100644 --- a/libgimp/gimp.c +++ b/libgimp/gimp.c @@ -21,6 +21,9 @@ #include "config.h" +#define _POSIX_SOURCE /* all the sigaction stuff is POSIX */ +#define _SVID_SOURCE /* except for SA_RESTART, it seems */ + #include #include #include diff --git a/libgimpbase/gimpsignal.c b/libgimpbase/gimpsignal.c index 648392aec2..33eed56b27 100644 --- a/libgimpbase/gimpsignal.c +++ b/libgimpbase/gimpsignal.c @@ -21,7 +21,7 @@ #include "config.h" -#define __POSIX_SOURCE /* all the sigaction stuff is POSIX */ +#define _POSIX_C_SOURCE 199309L /* all the sigaction stuff is POSIX */ #include diff --git a/modules/cdisplay_lcms.c b/modules/cdisplay_lcms.c index 5f940276bc..e3f8db8981 100644 --- a/modules/cdisplay_lcms.c +++ b/modules/cdisplay_lcms.c @@ -18,6 +18,8 @@ #include "config.h" +#include /* lcms.h uses the "inline" keyword */ + #ifdef HAVE_LCMS_LCMS_H #include #else diff --git a/modules/cdisplay_proof.c b/modules/cdisplay_proof.c index 833618ef7d..f8ef2d0410 100644 --- a/modules/cdisplay_proof.c +++ b/modules/cdisplay_proof.c @@ -18,6 +18,8 @@ #include "config.h" +#include /* lcms.h uses the "inline" keyword */ + #ifdef HAVE_LCMS_LCMS_H #include #else diff --git a/modules/controller_midi.c b/modules/controller_midi.c index 96d302ee64..d96043fe7d 100644 --- a/modules/controller_midi.c +++ b/modules/controller_midi.c @@ -22,6 +22,8 @@ #include "config.h" +#define _BSD_SOURCE /* the ALSA headers need this */ + #include #include #include diff --git a/plug-ins/common/gqbist.c b/plug-ins/common/gqbist.c index c2a690a4cf..000a4dde76 100644 --- a/plug-ins/common/gqbist.c +++ b/plug-ins/common/gqbist.c @@ -29,7 +29,10 @@ #include "config.h" +#define _POSIX_SOURCE /* need PATH_MAX */ + #include +#include #include @@ -38,8 +41,8 @@ #include "libgimp/stdplugins-intl.h" -#ifndef PATH_MAX -#define PATH_MAX _MAX_PATH +#if ! defined PATH_MAX && defined _MAX_PATH +# define PATH_MAX _MAX_PATH #endif /** qbist renderer ***********************************************************/ diff --git a/plug-ins/metadata/xmp-schemas.h b/plug-ins/metadata/xmp-schemas.h index 4eb8e3080a..604da19668 100644 --- a/plug-ins/metadata/xmp-schemas.h +++ b/plug-ins/metadata/xmp-schemas.h @@ -103,7 +103,7 @@ typedef struct #define XMP_PREFIX_IPTC_CORE "Iptc4xmpCore" /* List of known XMP schemas and their properties */ -XMPSchema * const xmp_schemas; +extern XMPSchema * const xmp_schemas; G_END_DECLS