]> granicus.if.org Git - graphviz/commitdiff
add tests for MINGW64 everywhere we have one for MINGW32
authorJohn Ellson <ellson@research.att.com>
Thu, 16 Aug 2012 13:53:06 +0000 (09:53 -0400)
committerJohn Ellson <ellson@research.att.com>
Thu, 16 Aug 2012 13:53:06 +0000 (09:53 -0400)
configure.ac
lib/graph/graphio.c
lib/gvc/gvconfig.c
lib/gvc/gvplugin.c

index cb7eec3259dc0750b7ea63b819bc559874cb22db..62264d2d3927f3306fa29fce02ad24a88b7b7f25 100644 (file)
@@ -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
index 4239ccffd21efe2105d3cd5959f55f776f098c9b..e8848455fcbcbfed44f4b707de6af095d234c072 100644 (file)
@@ -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)
 {
index dc3d57820f15811eda916733839e2beb38cb928b..ee8473c2b16cb4a836bc48be0b824c43724c7799 100644 (file)
@@ -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);
index cb8e2856ea27f30595f6238cc31b0ba4b2f0ca65..d120e5ee2a1575e53c9a12c7f0d4e6b3124c5c2a 100644 (file)
@@ -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" */