From 7e4bcfd6e02385fb680ace4a77b753cb83458884 Mon Sep 17 00:00:00 2001 From: Michele Martone Date: Tue, 5 Apr 2011 13:06:47 +0000 Subject: [PATCH] psblas3: introduced a header file which defines default values for fortran symbols mangling. it shall be used by each C source file defining symbols intended to be used by fortran. --- base/modules/Makefile | 4 ++-- base/modules/cutil.c | 1 + base/modules/fakempi.c | 16 +--------------- base/modules/psb_internals.h | 20 ++++++++++++++++++++ 4 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 base/modules/psb_internals.h diff --git a/base/modules/Makefile b/base/modules/Makefile index e8801da1..c5dae3ac 100644 --- a/base/modules/Makefile +++ b/base/modules/Makefile @@ -35,8 +35,8 @@ FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). $(FIFLAG). lib: penvmod $(UTIL_MODS) $(OBJS) $(AR) $(LIBDIR)/$(LIBNAME) $(MODULES) $(OBJS) $(MPFOBJS) $(RANLIB) $(LIBDIR)/$(LIBNAME) - /bin/cp -p $(LIBMOD) $(LIBDIR) - /bin/cp -p *$(.mod) $(LIBDIR) + /bin/cp -p $(CPUPDFLAG) $(LIBMOD) $(LIBDIR) + /bin/cp -p $(CPUPDFLAG) *$(.mod) $(LIBDIR) psi_comm_buffers_mod.o: psb_const_mod.o diff --git a/base/modules/cutil.c b/base/modules/cutil.c index 28718f5c..13b7e1e9 100644 --- a/base/modules/cutil.c +++ b/base/modules/cutil.c @@ -1,6 +1,7 @@ #include #include #include +#include "psb_internals.h" #ifdef LowerUnderscore #define psi_c_diffadd psi_c_diffadd_ diff --git a/base/modules/fakempi.c b/base/modules/fakempi.c index 3ba717c9..344fdf85 100644 --- a/base/modules/fakempi.c +++ b/base/modules/fakempi.c @@ -1,21 +1,7 @@ #include #include #include - -#ifndef LowerUnderscore -#ifndef LowerDoubleUnderscore -#ifndef LowerCase -#ifndef UpperUnderscore -#ifndef UpperDoubleUnderscore -#ifndef UpperCase -#define LowerUnderscore 1 /* 20110404 the default */ -/* #error "should specify a default mangling scheme" */ -#endif -#endif -#endif -#endif -#endif -#endif +#include "psb_internals.h" #ifdef LowerUnderscore diff --git a/base/modules/psb_internals.h b/base/modules/psb_internals.h new file mode 100644 index 00000000..5335ffd2 --- /dev/null +++ b/base/modules/psb_internals.h @@ -0,0 +1,20 @@ +#ifndef PSB_INTERNALS_H +#define PSB_INTERNALS_H + +/* providing a default mangling scheme */ +#ifndef LowerUnderscore +#ifndef LowerDoubleUnderscore +#ifndef LowerCase +#ifndef UpperUnderscore +#ifndef UpperDoubleUnderscore +#ifndef UpperCase +#define LowerUnderscore 1 /* 20110404 the default */ +/* #error "should specify a default mangling scheme" */ +#endif +#endif +#endif +#endif +#endif +#endif + +#endif