From: John Ellson Date: Thu, 16 Aug 2012 13:53:06 +0000 (-0400) Subject: add tests for MINGW64 everywhere we have one for MINGW32 X-Git-Tag: LAST_LIBGRAPH~32^2~344 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57adece750deaddcf6ac07b716a4547cbffe3d7a;p=graphviz add tests for MINGW64 everywhere we have one for MINGW32 --- diff --git a/configure.ac b/configure.ac index cb7eec325..62264d2d3 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ AC_SUBST([GVPLUGIN_VERSION]) GRAPHVIZ_VERSION_BUILD=0 GRAPHVIZ_VERSION_REVISION=0 case "${host_os}" in - *uwin* | *cygwin* | *mingw32* ) + *uwin* | *cygwin* | *mingw32* | *mingw64* ) # Windows version numbers # For the build number: months since Jan 2000, day of month from the timestamp # For the revision number: hour, minute from the timestamp @@ -117,6 +117,7 @@ esac UWIN=no CYGWIN=no MINGW32=no +MINGW64=no DARWIN9=no case "${host_os}" in *uwin* ) @@ -143,6 +144,13 @@ case "${host_os}" in NO_POSTSCRIPT_ALIAS=1 BROWSER="xdg-open" ;; + *mingw64* ) + MINGW64=yes + DEFAULT_FONTPATH="C:/WINDOWS/FONTS;C:/WINNT/Fonts;C:/winnt/fonts" + PATHSEPARATOR=":" + NO_POSTSCRIPT_ALIAS=1 + BROWSER="xdg-open" + ;; *darwin9* ) DARWIN=yes AC_DEFINE_UNQUOTED(DARWIN,1,[Define for any Darwin-based OS.]) @@ -176,13 +184,15 @@ case "${host_os}" in esac AC_SUBST([CYGWIN]) AC_SUBST([MINGW32]) +AC_SUBST([MINGW64]) AC_SUBST([DARWIN]) AC_SUBST([DARWIN9]) AC_SUBST([EXTRA_SMYRNA_LDFLAGS]) AC_DEFINE_UNQUOTED(DEFAULT_FONTPATH,"$DEFAULT_FONTPATH",[Path to TrueType fonts.]) AC_DEFINE_UNQUOTED(PATHSEPARATOR,"$PATHSEPARATOR",[Path separator character.]) AC_DEFINE_UNQUOTED(NO_POSTSCRIPT_ALIAS,$NO_POSTSCRIPT_ALIAS,[Postscript fontnames.]) -AM_CONDITIONAL(WITH_WIN32, [test "x$UWIN" = "xyes" -o "x$CYGWIN" = "xyes" -o "x$MINGW32" = "xyes"]) +# FIXME - WITH_WIN32 also set for MINGW64 - may need to separate +AM_CONDITIONAL(WITH_WIN32, [test "x$UWIN" = "xyes" -o "x$CYGWIN" = "xyes" -o "x$MINGW32" = "xyes" -o "x$MINGW64" = "xyes"]) AM_CONDITIONAL(WITH_DARWIN9, [test "x$DARWIN9" = "xyes"]) DEFAULT_DPI=96 @@ -241,7 +251,7 @@ if test "x$enable_shared" != "xno"; then AC_ENABLE_SHARED use_shared="Yes" case "${host_os}" in - *uwin* | *cygwin* | *mingw32* ) + *uwin* | *cygwin* | *mingw32* | *mingw64* ) AC_DEFINE_UNQUOTED(GVDLL,1, [Define for DLLs on Windows.]) ;; esac diff --git a/lib/graph/graphio.c b/lib/graph/graphio.c index 4239ccffd..e8848455f 100644 --- a/lib/graph/graphio.c +++ b/lib/graph/graphio.c @@ -213,7 +213,7 @@ void agsetiodisc( { if (myfgets) AG.fgets = myfgets; if (myfwrite) AG.fwrite = myfwrite; -#if defined(__SUNPRO_C) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__FreeBSD__) +#if defined(__SUNPRO_C) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(__FreeBSD__) #undef ferror #endif if (myferror) AG.ferror = myferror; @@ -592,7 +592,7 @@ static void free_printdict_t(printdict_t * dict) } #ifdef ferror -/* if ferror is a macro (__SUNPRO_C __CYGWIN__ __MINGW32__ __FreeBSD__ and poss others) +/* if ferror is a macro (__SUNPRO_C __CYGWIN__ __MINGW32__ __MINGW64__ __FreeBSD__ and poss others) * then wrap it in a function */ static int agferror(FILE *stream) { diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index dc3d57820..ee8473c2b 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -381,7 +381,7 @@ static void config_rescan(GVC_t *gvc, char *config_path) #if defined(DARWIN_DYLIB) char *plugin_re_beg = "[^0-9]\\."; char *plugin_re_end = "\\.dylib$"; -#elif defined(__MINGW32__) +#elif defined(__MINGW32__) || defined(__MINGW64__) char *plugin_glob = "libgvplugin_*"; char *plugin_re_beg = "[^0-9]-"; char *plugin_re_end = "\\.dll$"; @@ -420,7 +420,7 @@ static void config_rescan(GVC_t *gvc, char *config_path) config_re = gmalloc(strlen(plugin_re_beg) + 20 + strlen(plugin_re_end) + 1); -#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) +#if defined(WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) && !defined(__CYGWIN__) sprintf(config_re,"%s%s", plugin_re_beg, plugin_re_end); #elif defined(GVPLUGIN_VERSION) sprintf(config_re,"%s%d%s", plugin_re_beg, GVPLUGIN_VERSION, plugin_re_end); diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index cb8e2856e..d120e5ee2 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -204,7 +204,7 @@ gvplugin_library_t *gvplugin_library_load(GVC_t *gvc, char *path) s = strrchr(p, DIRSEP[0]); len = strlen(s); -#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) +#if defined(WIN32) && !defined(__MINGW32__) && !defined(__MINGW64__) && !defined(__CYGWIN__) if (len < strlen("/gvplugin_x")) { #else if (len < strlen("/libgvplugin_x")) { @@ -213,12 +213,12 @@ gvplugin_library_t *gvplugin_library_load(GVC_t *gvc, char *path) return NULL; } sym = gmalloc(len + strlen(suffix) + 1); -#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) +#if defined(WIN32) && !defined(__MINGW32__)&& !defined(__MINGW64__) && !defined(__CYGWIN__) strcpy(sym, s+1); /* strip leading "/" */ #else strcpy(sym, s+4); /* strip leading "/lib" or "/cyg" */ #endif -#if defined(__CYGWIN__) || defined(__MINGW32__) +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) s = strchr(sym, '-'); /* strip trailing "-1.dll" */ #else s = strchr(sym, '.'); /* strip trailing ".so.0" or ".dll" or ".sl" */