(source modifs) Fix: Rename macros as it conflicts with Mingw headers.

* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)
This commit is contained in:
Félix Piédallu 2018-01-30 17:27:43 +01:00 committed by Jehan
parent bff3903f37
commit fc8303dd0a
7 changed files with 11 additions and 23 deletions

View File

@ -15,7 +15,7 @@ endif
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"Gimp-Config\" \
-DGIMP_APP_VERSION_STRING=\"$(GIMP_APP_VERSION)\" \
-DDATADIR=\""$(datadir)"\" \
-DGIMPDATADIR=\""$(datadir)"\" \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_builddir)/app \

View File

@ -51,10 +51,10 @@ libgimpbaseincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpbase
AM_CPPFLAGS = \
-DPREFIX=\""$(prefix)"\" \
-DGIMPDIR=\""$(gimpdir)"\" \
-DDATADIR=\""$(gimpdatadir)"\" \
-DGIMPDATADIR=\""$(gimpdatadir)"\" \
-DLOCALEDIR=\""$(gimplocaledir)"\" \
-DPLUGINDIR=\""$(gimpplugindir)"\" \
-DSYSCONFDIR=\""$(gimpsysconfdir)"\" \
-DGIMPSYSCONFDIR=\""$(gimpsysconfdir)"\" \
-DGIMP_PACKAGE=\""@PACKAGE@"\" \
-DGIMP_DATA_VERSION=\"$(GIMP_DATA_VERSION)\" \
-DGIMP_USER_VERSION=\"$(GIMP_USER_VERSION)\" \

View File

@ -65,14 +65,8 @@
#define geteuid() 0
#define getegid() 0
/* This is a hack for Windows known directory support.
* DATADIR (autotools-generated constant) is a type defined in objidl.h
* so we must #undef it before including shlobj.h in order to avoid a
* name clash. */
static const char* datadir = DATADIR;
#undef DATADIR
#include <shlobj.h>
#define DATADIR datadir
/* Constant available since Shell32.dll 4.72 */
#ifndef CSIDL_APPDATA
#define CSIDL_APPDATA 0x001a
@ -497,7 +491,7 @@ gimp_data_directory (void)
GIMP_DATA_VERSION,
NULL);
gimp_data_dir = gimp_env_get_dir ("GIMP3_DATADIR", DATADIR, tmp);
gimp_data_dir = gimp_env_get_dir ("GIMP3_DATADIR", GIMPDATADIR, tmp);
g_free (tmp);
}
@ -584,7 +578,7 @@ gimp_sysconf_directory (void)
GIMP_SYSCONF_VERSION,
NULL);
gimp_sysconf_dir = gimp_env_get_dir ("GIMP3_SYSCONFDIR", SYSCONFDIR, tmp);
gimp_sysconf_dir = gimp_env_get_dir ("GIMP3_SYSCONFDIR", GIMPSYSCONFDIR, tmp);
g_free (tmp);
}

View File

@ -38,14 +38,8 @@
#include <glib/gprintf.h>
#if defined(G_OS_WIN32)
/* This is a hack for Windows known directory support.
* DATADIR (autotools-generated constant) is a type defined in objidl.h
* so we must #undef it before including shlobj.h in order to avoid a
* name clash. */
#undef DATADIR
#include <windows.h>
#include <shlobj.h>
# include <windows.h>
# include <shlobj.h>
#else /* G_OS_WIN32 */

View File

@ -17,7 +17,7 @@ help_RC = help.rc.o
endif
AM_CPPFLAGS = \
-DDATADIR=\""$(gimpdatadir)"\" \
-DGIMPDATADIR=\""$(gimpdatadir)"\" \
-I$(top_srcdir) \
$(CAIRO_CFLAGS) \
$(GIO_CFLAGS) \

View File

@ -69,7 +69,7 @@ AM_CPPFLAGS = \
-DBINDIR=\""$(bindir)"\" \
-DSBINDIR=\""$(sbindir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DSYSDATADIR=\""$(datadir)"\" \
-DDATAROOTDIR=\""$(datarootdir)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DSHAREDSTATEDIR=\""$(sharedstatedir)"\" \

View File

@ -75,7 +75,7 @@ static struct {
{ "bindir", BINDIR },
{ "sbindir", SBINDIR },
{ "libexecdir", LIBEXECDIR },
{ "datadir", DATADIR },
{ "datadir", SYSDATADIR },
{ "datarootdir", DATAROOTDIR },
{ "sysconfdir", SYSCONFDIR },
{ "sharedstatedir", SHAREDSTATEDIR },