make sure all of ABC and related libraries are in the same namespace (when compiled with ABC_NAMESPACE) by removing extern "C" from function definitions

This commit is contained in:
Baruch Sterin 2015-10-16 14:02:38 -07:00
parent 8810ef12da
commit 0e1eb98988
15 changed files with 9 additions and 113 deletions

View File

@ -1,6 +1,12 @@
extern int Abc_RealMain(int argc, char *argv[]);
#include <misc/util/abc_global.h>
ABC_NAMESPACE_IMPL_START
int Abc_RealMain(int argc, char *argv[]);
ABC_NAMESPACE_IMPL_END
int main(int argc, char *argv[])
{
return Abc_RealMain(argc, argv);
return ABC_NAMESPACE_PREFIX Abc_RealMain(argc, argv);
}

View File

@ -89,10 +89,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddAddFind.c,v 1.8 2004/08/13 18:04:45 fa
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -103,10 +99,6 @@ static DdNode * addDoIthBit (DdManager *dd, DdNode *f, DdNode *index);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -103,10 +103,6 @@ static DdNode *background, *zero;
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -118,10 +114,6 @@ static enum st__retval cuddApaStCountfree (char * key, char * value, char * arg)
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
} /* end of extern "C" */
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */

View File

@ -101,10 +101,6 @@ static int num_calls;
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -119,10 +115,6 @@ static enum st__retval CorrelCleanUp (char *key, char *value, char *arg);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */

View File

@ -106,10 +106,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddBridge.c,v 1.19 2008/04/25 06:42:55 fa
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -125,10 +121,6 @@ static DdNode * cuddBddTransferRecur (DdManager *ddS, DdManager *ddD, DdNode *f,
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */

View File

@ -122,10 +122,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddGenCof.c,v 1.38 2005/05/14 17:27:11 fa
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -143,10 +139,6 @@ static DdNode * cuddBddSqueeze (DdManager *dd, DdNode *l, DdNode *u);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -134,10 +134,6 @@ static int cross; /* the number of crossovers to perform */
*/
#define STOREDD(i,j) storedd[(i)*(numvars+1)+(j)]
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -160,10 +156,6 @@ static int roulette (int *p1, int *p2);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -103,13 +103,7 @@ ABC_NAMESPACE_IMPL_START
/* Type declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*DD_CHKFP)(DdManager *, int, int);
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Variable declarations */
@ -139,10 +133,6 @@ static unsigned int originalSize;
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -176,10 +166,6 @@ static int ddIsVarHandled (DdManager *dd, int index);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -111,10 +111,6 @@ static DdNode *one, *zero;
#define WEIGHT(weight, col) ((weight) == NULL ? 1 : weight[col])
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -129,10 +125,6 @@ static DdNode * getCube (DdManager *manager, st__table *visited, DdNode *f, int
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -158,10 +158,6 @@ static DdNode **currentQueuePage; /* current page */
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -179,10 +175,6 @@ static enum st__retval stPathTableDdFree (char *key, char *value, char *arg);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of Exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -158,10 +158,6 @@ static long shuffleTable[STAB_SIZE];
#define bang(f) ((Cudd_IsComplement(f)) ? '!' : ' ')
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -188,10 +184,6 @@ static enum st__retval ddEpdFree (char * key, char * value, char * arg);
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -95,10 +95,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddZddCount.c,v 1.14 2004/08/13 18:04:53
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -112,10 +108,6 @@ static enum st__retval st__zdd_count_dbl_free (char *key, char *value, char *arg
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -107,10 +107,6 @@ static char rcsid[] DD_UNUSED = "$Id: cuddZddSetop.c,v 1.25 2004/08/13 18:04:54
/* Macro declarations */
/*---------------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/**AutomaticStart*************************************************************/
/*---------------------------------------------------------------------------*/
@ -123,10 +119,6 @@ static void zddVarToConst (DdNode *f, DdNode **gp, DdNode **hp, DdNode *base, Dd
/**AutomaticEnd***************************************************************/
#ifdef __cplusplus
}
#endif
/*---------------------------------------------------------------------------*/
/* Definition of exported functions */
/*---------------------------------------------------------------------------*/

View File

@ -82,6 +82,7 @@
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
////////////////////////////////////////////////////////////////////////
/// NAMESPACES ///

View File

@ -16,10 +16,6 @@
ABC_NAMESPACE_HEADER_START
#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */
typedef float qps_float_t;
typedef struct qps_problem {
@ -138,11 +134,6 @@ extern "C" {
/* this discards the private data structures assigned by qps_init() */
extern void qps_clean(qps_problem_t *);
#if defined(__cplusplus)
}
#endif /* __cplusplus */
ABC_NAMESPACE_HEADER_END
#endif /* _QPS_H */