From: ellson Date: Mon, 5 Jan 2009 20:12:47 +0000 (+0000) Subject: this is supposed to fix mingw builds - seems to be ok on linux X-Git-Tag: LAST_LIBGRAPH~32^2~2723 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc428d0f1951ac22d3cdd6456ffffb587bc71b0f;p=graphviz this is supposed to fix mingw builds - seems to be ok on linux --- diff --git a/lib/common/pointset.h b/lib/common/pointset.h index 06f309d4b..64fbfe279 100644 --- a/lib/common/pointset.h +++ b/lib/common/pointset.h @@ -14,16 +14,12 @@ * AT&T Research, Florham Park NJ * **********************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - - - #ifndef _POINTSET_H #define _POINTSET_H 1 -#include "render.h" +#ifdef __cplusplus +extern "C" { +#endif typedef Dict_t PointSet; typedef Dict_t PointMap; @@ -41,9 +37,10 @@ extern "C" { extern void clearPM(PointMap *); extern void freePM(PointMap *); extern int insertPM(PointMap *, int, int, int); -#endif #ifdef __cplusplus } #endif + +#endif /* _POINTSET_H */ diff --git a/lib/common/render.h b/lib/common/render.h index c3d6bf92a..b9e49439c 100644 --- a/lib/common/render.h +++ b/lib/common/render.h @@ -144,11 +144,6 @@ extern "C" { # define extern __EXPORT__ #endif - extern void gv_nodesize(Agnode_t * n, boolean flip); - extern void start_timer(void); - extern double elapsed_sec(void); - extern void cat_libfile(GVJ_t * job, const char **arglib, const char **stdlib); - #ifdef WITH_CODEGENS extern codegen_info_t *first_codegen(void); extern codegen_info_t *next_codegen(codegen_info_t * p); diff --git a/lib/common/utils.h b/lib/common/utils.h index 78edd6d75..987a27003 100644 --- a/lib/common/utils.h +++ b/lib/common/utils.h @@ -14,10 +14,23 @@ * AT&T Research, Florham Park NJ * **********************************************************/ +#ifndef _UTILS_H +#define _UTILS_H 1 + #ifdef __cplusplus extern "C" { #endif +#ifdef GVDLL +# ifdef _BLD_gvc +# define extern __declspec(dllimport) +# else +# define extern __declspec(dllexport) +# endif +#else +# define extern +#endif + #ifndef HAVE_STRCASECMP extern int strcasecmp(const char *s1, const char *s2); #endif @@ -29,11 +42,6 @@ extern "C" { extern void free_queue(nodequeue *); extern void enqueue(nodequeue *, Agnode_t *); extern Agnode_t *dequeue(nodequeue *); - -#if defined(_BLD_dot) && defined(_DLL) -# define extern __EXPORT__ -#endif - extern pointf Bezier(pointf *, int, double, pointf *, pointf *); extern void attach_attrs(graph_t * g); extern void attach_attrs_and_arrows(graph_t*, int*, int*); @@ -101,6 +109,22 @@ extern "C" { extern Agsym_t *setAttr(graph_t*, void*, char*name, char *value, Agsym_t*); extern void setEdgeType (graph_t* g, int dflt); extern int edgeType (char* s, int dflt); + + /* from postproc.c */ + extern void gv_nodesize(Agnode_t * n, boolean flip); + + /* from timing.c */ + extern void start_timer(void); + extern double elapsed_sec(void); + + /* from psusershape.c */ + extern void cat_libfile(GVJ_t * job, const char **arglib, const char **stdlib); + + +#undef extern + #ifdef __cplusplus } #endif + +#endif /* _UTILS_H */