Fix triangle.h conflict with OpenFOAM
- Rename triangle.h to cork_triangle.h to avoid conflict with OpenFOAM's triangle.H - Add header guards (#ifndef CORK_TRIANGLE_H) to prevent multiple inclusion - Add REAL type definition to prevent compilation errors - Update all references from triangle.h to cork_triangle.h in: - src/isct/triangle.c - src/mesh/mesh.isct.tpp This resolves the triangulateio struct redefinition error when building with OpenFOAM integration.
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
#ifndef CORK_TRIANGLE_H
|
||||
#define CORK_TRIANGLE_H
|
||||
|
||||
/* Define REAL type */
|
||||
#ifndef SINGLE
|
||||
#define REAL double
|
||||
#else
|
||||
#define REAL float
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
/* */
|
||||
/* (triangle.h) */
|
||||
@@ -287,3 +298,4 @@ void trifree(void *memptr);
|
||||
/*void triangulate();
|
||||
void trifree();*/
|
||||
/*#endif*/ /* not ANSI_DECLARATORS */
|
||||
#endif /* CORK_TRIANGLE_H */
|
||||
+1
-1
@@ -354,7 +354,7 @@
|
||||
#include <fpu_control.h>
|
||||
#endif /* LINUX */
|
||||
#ifdef TRILIBRARY
|
||||
#include "triangle.h"
|
||||
#include "cork_triangle.h"
|
||||
#endif /* TRILIBRARY */
|
||||
|
||||
/* A few forward declarations. */
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
#define REAL double
|
||||
extern "C" {
|
||||
#include "triangle.h"
|
||||
#include "cork_triangle.h"
|
||||
}
|
||||
|
||||
struct GenericVertType;
|
||||
|
||||
Reference in New Issue
Block a user