]> granicus.if.org Git - graphviz/commitdiff
static windows build compatibility
authorarif <devnull@localhost>
Mon, 19 Jan 2009 18:18:07 +0000 (18:18 +0000)
committerarif <devnull@localhost>
Mon, 19 Jan 2009 18:18:07 +0000 (18:18 +0000)
lib/common/geom.c
lib/common/geomprocs.h
lib/common/utils.c

index 9f3febb895f7f361820aa4c98eb5c577cc9b2ee9..126cca43db2cdb3465f02cc52be67193a228ebcb 100644 (file)
@@ -193,8 +193,10 @@ int lineToBox(pointf p, pointf q, boxf b)
     }
     return -1;
 }
-
-inline void rect2poly(pointf *p)
+#ifdef WIN32_STATIC
+#define inline
+#endif
+void rect2poly(pointf *p)
 {
     p[3].x = p[2].x = p[1].x;
     p[2].y = p[1].y;
@@ -357,7 +359,7 @@ inline box flip_rec_box(box b, point p)
     return r;
 }
 
-inline boxf flip_rec_boxf(boxf b, pointf p)
+boxf flip_rec_boxf(boxf b, pointf p)
 {
     boxf r;
     /* flip box */
@@ -373,6 +375,11 @@ inline boxf flip_rec_boxf(boxf b, pointf p)
     return r;
 }
 
+#ifdef WIN32_STATIC
+#undef inline
+#endif
+
+
 #define SMALL 0.0000000001
 
 /* ptToLine2:
index daf0c691e8297c50fdffe5625eaa4801973f9f7f..2cb7d56a8a497637b82fd662d4e3f43422ec23fd 100644 (file)
@@ -53,6 +53,11 @@ extern void rect2poly(pointf *p);
 
 extern int line_intersect (pointf a, pointf b, pointf c, pointf d, pointf* p);
 
+#ifdef WIN32_STATIC
+#define inline __inline
+#endif
+
+
 static inline point pointof(int x, int y)
 {
     point r;
@@ -256,6 +261,10 @@ static inline pointf scale (double c, pointf p)
     r.y = c * p.y;
     return r;
 }
+#ifdef WIN32_STATIC
+#undef inline
+#endif
+
 #undef extern
 #ifdef __cplusplus
 }
index 9dd17757235fdd54b000b040fef795968cece6c5..2e29179e70ca6e069943826fe12606963e7fd3b1 100644 (file)
@@ -1760,8 +1760,10 @@ void setEdgeType (graph_t* g, int dflt)
     GD_flags(g) |= et;
 }
 
+#ifndef WIN32_STATIC
 #ifndef HAVE_STRCASECMP
 
+
 #include <string.h>
 #include <ctype.h>
 
@@ -1779,9 +1781,10 @@ int strcasecmp(const char *s1, const char *s2)
 }
 
 #endif                         /* HAVE_STRCASECMP */
+#endif                         /*WIN32_STATIC*/
 
-#ifndef HAVE_STRNCASECMP
-
+#ifndef WIN32_STATIC
+#ifndef HAVE_STRCASECMP
 #include <string.h>
 #include <ctype.h>
 
@@ -1803,7 +1806,7 @@ int strncasecmp(const char *s1, const char *s2, unsigned int n)
 }
 
 #endif                         /* HAVE_STRNCASECMP */
-
+#endif
 void gv_free_splines(edge_t * e)
 {
     int i;