- Timestamp:
- Oct 20, 1999, 12:25:32 PM (26 years ago)
- Location:
- trunk/SophyaLib
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/BaseTools/history_eros
r251 r480 1 1 SysTools from LibsUtil 2 machdefs.h from machine.h defs.h 2 3 -----------> defs.h 3 4 Repository revision: 1.21 /projects/Eros/CVSEros/LibsUtil/defs.h,v 5 MAJ 1.24 4 6 -----------> machine.h 5 7 Repository revision: 1.9 /projects/Eros/CVSEros/LibsUtil/machine.h,v 8 MAJ 1.12 6 9 -----------> timing.c 7 10 Repository revision: 1.2 /projects/Eros/CVSEros/LibsUtil/timing.c,v … … 19 22 -----------> pdlmgr.cc 20 23 Repository revision: 1.2 /projects/Eros/CVSEros/CodeCxx/Outils/pdlmgr.cc,v 24 MAJ 1.6 21 25 -----------> pdlmgr.h 22 26 Repository revision: 1.2 /projects/Eros/CVSEros/CodeCxx/Outils/pdlmgr.h,v 27 MAJ 1.4 23 28 -----------> peidainit.h 24 29 Repository revision: 1.6 /projects/Eros/CVSEros/CodeCxx/Outils/peidainit.h,v … … 27 32 -----------> periodic.h 28 33 Repository revision: 1.4 /projects/Eros/CVSEros/CodeCxx/Outils/periodic.h,v 34 MAJ 1.5 29 35 -----------> perrors.h 30 36 Repository revision: 1.4 /projects/Eros/CVSEros/CodeCxx/Outils/perrors.h,v … … 35 41 -----------> psighand.cc 36 42 Repository revision: 1.2 /projects/Eros/CVSEros/CodeCxx/Outils/psighand.cc,v 43 MAJ 1.3 37 44 -----------> psighand.h 38 45 Repository revision: 1.1 /projects/Eros/CVSEros/CodeCxx/Outils/psighand.h,v 46 MAJ 1.2 -
trunk/SophyaLib/BaseTools/machdefs.h
r269 r480 26 26 #endif 27 27 28 #if def sun28 #if defined(SunOS) || defined ( sun ) 29 29 #define MACH_SUN 30 30 #define OS_SOLARIS … … 142 142 typedef unsigned long long uint_8; 143 143 144 #ifdef powerpc 145 #define SWAP 0 146 #define SWAPDEFAUT 0 147 #else 144 148 #define SWAP 1 145 149 #define SWAPDEFAUT 1 150 #endif 146 151 147 152 #elif defined(OS_MACOS) … … 183 188 /* __aCC__ : aCC on HP */ 184 189 /* __KCC__ : KCC, version >= 3.3 is required */ 190 /* __SGICC__ : SGI (IRIX64) CC compiler */ 185 191 186 192 /***********************************************************************/ … … 201 207 /* HAS_IOS_NOCREATE */ 202 208 /* HAS_VEC_NEW : operator new[] */ 209 /* CC_HAS_RTTI_SUPPORT has Run Time Type Identification support */ 203 210 /* ANSI_IO : rdbuf()->pubseekoff rather than seekg */ 204 211 /* HAS_STR_NPOS : has string::npos and not a global NPOS */ … … 214 221 #ifndef COMPILER_EXCEPTIONS 215 222 #define COMPILER_EXCEPTIONS 223 #endif 224 225 #ifndef CC_HAS_RTTI_SUPPORT 226 #define CC_HAS_RTTI_SUPPORT 216 227 #endif 217 228 … … 246 257 247 258 #if defined (__aCC__) 248 #ifndef COMPILER_EXCEPTIONS249 #define COMPILER_EXCEPTIONS250 #endif251 259 #ifndef ANSI_TEMPLATES 252 260 #define ANSI_TEMPLATES … … 258 266 #define STREAMPOS_IS_CLASS 259 267 #define HAS_STR_NPOS 260 #ifndef COMPILER_EXCEPTIONS261 #define COMPILER_EXCEPTIONS262 #endif263 268 #ifndef ANSI_TEMPLATES 264 269 #define ANSI_TEMPLATES 265 270 #endif 266 #endif 267 271 /* Standard C++ library classes are in the namespace std */ 272 #ifdef __cplusplus 273 namespace std { } 274 using namespace std; 275 #endif 276 #endif 277 278 #if defined(__SGICC__) 279 /* Standard C++ library classes are in the namespace std */ 280 #define HAS_STR_NPOS 281 #ifndef ANSI_TEMPLATES 282 #define ANSI_TEMPLATES 283 #endif 284 #ifdef __cplusplus 285 namespace std { } 286 using namespace std; 287 #endif 288 #endif 268 289 269 290 /* Get things has homogeneous as possible between compilers */ -
trunk/SophyaLib/BaseTools/ppersist.h
r269 r480 12 12 #include "pexceptions.h" 13 13 #include "md5.h" 14 15 #include <time.h> 14 16 15 17 #include <string> -
trunk/SophyaLib/Mgr/Makefile.h
r478 r480 55 55 #### Fortran (tout ce qui est lie au Fortran est defini ici ############# 56 56 FC = f77 57 ifeq ($(SITE),CCIN2P3)58 ifeq ($(MACHEROS),AIX)59 override FC := xlf60 endif61 endif62 57 ifeq (${MACHEROS},Linux) 63 58 # override FC := f77 … … 87 82 EXE := ${PP}/Exec/ 88 83 INC := ${DPCDEVREP}/Include/ 89 CCI := ${INC}/CInc/ 90 GLB := ${GNU}/${MACHEROS}/lib/ 84 GLB := /usr/local/lib/ 91 85 #-- 92 86 … … 99 93 ifndef DBGFLAG 100 94 DBGFLAG := -g 95 # Probleme sur DEC/OSF1 -g avec g++/egcs pose probleme a l'assembleur 96 # Reza 09/99 - On met -gcoff 97 ifeq (${MACHEROS},OSF1) 98 ifeq ($(CXX), g++) 99 override DBGFLAG := -gcoff 100 endif 101 endif 101 102 endif 102 103 … … 127 128 # Avec certains compilateurs C++ (KCC, aCC) , il faut fabriquer les librairies et 128 129 # les shared libs avec la meme commande 129 override ARCXX := 130 ifeq ($(CXX),KCC) 131 ARCXX := KCC 132 endif 130 override ARCXX := $(AR) 131 override ARCXXFLAGS := $(ARFLAGS) 132 #RZ0999 ifeq ($(CXX),KCC) 133 #RZ0999 override ARCXX := KCC 134 #RZ0999 override ARCXXFLAGS := -o 135 #RZ0999 endif 133 136 ifeq ($(CXX),aCC) 134 ARCXX := aCC 137 override ARCXX := aCC 138 override ARCXXFLAGS := -o 135 139 endif 136 140 … … 144 148 # Pour compiler PI, sous Linux, les includes et libs se trouve souvent ds /usr/X11/include /usr/X11/lib/ 145 149 ifeq (${MACHEROS},Linux) 146 XLDLIBS := -L/usr/X11/lib 147 XCFLAGS := -I/usr/X11/include 150 XLDLIBS := -L/usr/X11/lib -L/usr/X11R6/lib 151 XCFLAGS := -I/usr/X11/include -I/usr/X11R6/include 148 152 LDLIBS := -ldl 149 153 endif 150 154 151 # Pour RFIO152 ifeq ($(SITE),CCIN2P3)153 XCFLAGS := $(XCFLAGS) -D RFIO -I/usr/local/include/shift154 XLDLIBS := $(XLDLIBS) -L/usr/local/lib -lshift155 endif156 157 # Les bibliotheques gnu C pour le fort du CCPN158 ifeq ($(SITE),CCIN2P3)159 ifeq ($(CC), gcc)160 ifeq ($(MACHEROS),HP-UX)161 FGLIB := -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1 -lgcc162 endif163 ifeq ($(MACHEROS),AIX)164 FGLIB := -L/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/2.7.2.1 -lgcc165 endif166 endif167 endif168 155 169 156 # Chemin pour la librairie cfitsio … … 180 167 #endif 181 168 182 CPPFLAGS := -I${INC} -I$(FITSIOREP) -D${MACHEROSD} -I$(INC)/tnt$(MODULECPPFLAGS)169 CPPFLAGS := -I${INC} -I$(FITSIOREP) -D${MACHEROSD} $(MODULECPPFLAGS) 183 170 184 171 # Les options selon les divers compilateurs … … 256 243 endif 257 244 258 #gcc sur Solaris259 ifeq ($(MACHEROS),SunOS)260 override NOSHLIB := Y261 endif262 245 263 246 ifeq ($(CXX), cxx) … … 338 321 endif 339 322 340 341 # Compilateur KAI 323 # --- Compilateur KAI (OK pour v 3.3) 342 324 ifeq ($(CXX), KCC) 343 325 CXXFLAGS := --exceptions --rtti --auto_instantiation --one_instantiation_per_object -D__KCC__ … … 346 328 endif 347 329 330 # --- Compilateur natif CC de SGI 331 ifeq ($(MACHEROS), IRIX64) 332 ifeq ($(CXX), CC) 333 CXXFLAGS := -prelink -D__SGICC__ 334 endif 335 endif 336 348 337 # Autres compilateurs natifs. 349 338 -
trunk/SophyaLib/Mgr/Makefile.slb
r478 r480 6 6 slbpi: slb $(SLB)libPI.so 7 7 8 # Chemin des librairies Motifs / X11 (pour chemin non standard) 9 LIBXPATH := 8 10 # Commande de construction de shared-lib 9 11 CMDSHL := ld -partage … … 19 21 CMDTILSHL := echo 'Cas Non Prevu' 20 22 CMDTILSHLPI := echo 'Cas Non Prevu' 21 # Chemin des librairies Motifs / X11 (pour chemin non standard) 22 LIBXPATH := 23 # Utilisation du compilo C++ comme driver pour fabrication des shared-libs 24 CMDSHLCXX := $(LINK.cc) 25 FGSHLACXX := 26 FGSHLNCXX := 27 # S'il faut utiliser $(CMDSHLCXX) pour fabrication des shared-libs 28 USECXX4SO := N 29 # On utilise le compilo g++ pour la fabrication des shared libs 30 ifeq ($(EROSCXX), g++) 31 override USECXX4SO := Y 32 override CMDSHLCXX := $(LINK.cc) -shared 33 endif 34 35 # On utilise le compilo KCC pour la fabrication des shared libs 36 ifeq ($(EROSCXX), KCC) 37 override USECXX4SO := Y 38 override CMDSHLCXX := $(LINK.cc) 39 endif 40 41 # On utilise le compilo aCC (HP) pour la fabrication des shared libs 42 ifeq ($(EROSCXX), aCC) 43 override USECXX4SO := Y 44 override CMDSHLCXX := $(LINK.cc) -b 45 endif 23 46 24 47 # Construction de shared-libs sous OSF1 … … 38 61 override TILSHLPI := 39 62 override CMDTILSHLPI := echo 'No Template instanciation library' 63 override USECXX4SO := N 40 64 endif 65 # Attention - Dangereux de mettre -expect_unresolved , $CHECK$ Reza 20/10/99 41 66 override CMDSHLCXX := $(LINK.cc) -shared -expect_unresolved '*' 42 67 override FGSHLACXX := … … 50 75 override FGSHLN := --no-whole-archiv 51 76 override CMDSHLCXX := $(LINK.cc) -shared 77 ifeq ($(EROSCXX), KCC) 78 override CMDSHLCXX := $(LINK.cc) 79 endif 52 80 override FGSHLACXX := 53 81 override FGSHLNCXX := … … 55 83 override TILSHL := 56 84 override CMDTILSHL := echo 'No Template instanciation library' 85 override LIBXPATH := -L/usr/X11/lib -L/usr/X11R6/lib 86 endif 87 88 # Construction de shared-libs sous Sun-OS 89 ifeq ($(MACHEROS),SunOS) 90 override CMDSHL := ld -G 91 override FGSHLA := -z allextract 92 override FGSHLN := -z weakextract 93 override LIBLSHL := $(LIBG) -lm -lc 94 override TILSHL := 95 override CMDTILSHL := echo 'No Template instanciation library' 57 96 override LIBXPATH := -L/usr/X11/lib 97 override USECXX4SO := Y 98 endif 99 100 # Construction de shared-libs sous SGI 101 ifeq ($(MACHEROS), IRIX64) 102 override CMDSHL := ld -shared 103 override FGSHLA := -all 104 override FGSHLN := -notall 105 override LIBLSHL := $(LIBG) -lm -lc 106 override TILSHL := 107 override CMDTILSHL := echo 'No Template instanciation library' 108 ifeq ($(EROSCXX), CC) 109 override CMDSHLCXX := CC -shared 110 override LIBLSHL := -lm -lc 111 endif 112 override LIBXPATH := -L/usr/X11/lib 113 override USECXX4SO := Y 58 114 endif 59 115 -
trunk/SophyaLib/Mgr/MakefileUser.h
r478 r480 55 55 #### Fortran (tout ce qui est lie au Fortran est defini ici ############# 56 56 FC = f77 57 ifeq ($(SITE),CCIN2P3)58 ifeq ($(MACHEROS),AIX)59 override FC := xlf60 endif61 endif62 57 ifeq (${MACHEROS},Linux) 63 58 # override FC := f77 … … 88 83 EXE := ${PPH}/Exec/ 89 84 INC := ${DPCBASEREP}/Include/ 90 CCI := ${INC}/CInc/ 91 GLB := ${GNU}/${MACHEROS}/lib/ 85 GLB := /usr/local/lib/ 92 86 #-- 93 87 … … 100 94 ifndef DBGFLAG 101 95 DBGFLAG := -g 96 # Probleme sur DEC/OSF1 -g avec g++/egcs pose probleme a l'assembleur 97 # Reza 09/99 - On met -gcoff 98 ifeq (${MACHEROS},OSF1) 99 ifeq ($(CXX), g++) 100 override DBGFLAG := -gcoff 101 endif 102 endif 102 103 endif 103 104 … … 128 129 # Avec certains compilateurs C++ (KCC, aCC) , il faut fabriquer les librairies et 129 130 # les shared libs avec la meme commande 130 override ARCXX := 131 ifeq ($(CXX),KCC) 132 ARCXX := KCC 133 endif 131 override ARCXX := $(AR) 132 override ARCXXFLAGS := $(ARFLAGS) 133 #RZ0999 ifeq ($(CXX),KCC) 134 #RZ0999 override ARCXX := KCC 135 #RZ0999 override ARCXXFLAGS := -o 136 #RZ0999 endif 134 137 ifeq ($(CXX),aCC) 135 ARCXX := aCC 138 override ARCXX := aCC 139 override ARCXXFLAGS := -o 136 140 endif 137 141 … … 145 149 # Pour compiler PI, sous Linux, les includes et libs se trouve souvent ds /usr/X11/include /usr/X11/lib/ 146 150 ifeq (${MACHEROS},Linux) 147 XLDLIBS := -L/usr/X11/lib 148 XCFLAGS := -I/usr/X11/include 151 XLDLIBS := -L/usr/X11/lib -L/usr/X11R6/lib 152 XCFLAGS := -I/usr/X11/include -I/usr/X11R6/include 149 153 LDLIBS := -ldl 150 154 endif 151 155 152 # Pour RFIO153 ifeq ($(SITE),CCIN2P3)154 XCFLAGS := $(XCFLAGS) -D RFIO -I/usr/local/include/shift155 XLDLIBS := $(XLDLIBS) -L/usr/local/lib -lshift156 endif157 158 # Les bibliotheques gnu C pour le fort du CCPN159 ifeq ($(SITE),CCIN2P3)160 ifeq ($(CC), gcc)161 ifeq ($(MACHEROS),HP-UX)162 FGLIB := -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux9.05/2.7.2.1 -lgcc163 endif164 ifeq ($(MACHEROS),AIX)165 FGLIB := -L/usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/2.7.2.1 -lgcc166 endif167 endif168 endif169 156 170 157 # Chemin pour la librairie cfitsio … … 181 168 #endif 182 169 183 CPPFLAGS := -I${INC} -I$(FITSIOREP) -D${MACHEROSD} -I$(INC)/tnt$(MODULECPPFLAGS)170 CPPFLAGS := -I${INC} -I$(FITSIOREP) -D${MACHEROSD} $(MODULECPPFLAGS) 184 171 185 172 # Les options selon les divers compilateurs … … 257 244 endif 258 245 259 #gcc sur Solaris260 ifeq ($(MACHEROS),SunOS)261 override NOSHLIB := Y262 endif263 246 264 247 ifeq ($(CXX), cxx) … … 339 322 endif 340 323 341 342 # Compilateur KAI 324 # --- Compilateur KAI (OK pour v 3.3) 343 325 ifeq ($(CXX), KCC) 344 326 CXXFLAGS := --exceptions --rtti --auto_instantiation --one_instantiation_per_object -D__KCC__ … … 347 329 endif 348 330 331 # --- Compilateur natif CC de SGI 332 ifeq ($(MACHEROS), IRIX64) 333 ifeq ($(CXX), CC) 334 CXXFLAGS := -prelink -D__SGICC__ 335 endif 336 endif 337 349 338 # Autres compilateurs natifs. 350 339 -
trunk/SophyaLib/Mgr/history_eros
r260 r480 1 1 Mgr from Mgr 2 2 Mgr from Mgr 3 -----------> Makefile.h 4 Nettoyage et MAJ Repository revision: 1.61 5 -----------> Makefile.slb 6 Nettoyage et MAJ Repository revision: 1.26 3 7 -----------> chk_cvs.csh 4 8 Repository revision: 1.2 /projects/Eros/CVSEros/CodeCxx/Mgr/chk_cvs.csh,v … … 17 21 -----------> mkmf 18 22 Repository revision: 1.36 /projects/Eros/CVSEros/CodeCxx/Mgr/mkmf,v 23 MAJ 1.39 pour flag powerpc - mais pas pour HP-UX slb (.sl) 19 24 -----------> mkmfPI 20 25 Repository revision: 1.15 /projects/Eros/CVSEros/CodeCxx/Mgr/mkmfPI,v 21 26 -----------> mkmflib 22 27 Repository revision: 1.11 /projects/Eros/CVSEros/CodeCxx/Mgr/mkmflib,v 28 MAJ 1.12 $(AR) et $(ARFLAGS) -> $(ARCXX) et $(ARCXXFLAGS) 23 29 -----------> mkmflien 24 30 Repository revision: 1.15 /projects/Eros/CVSEros/CodeCxx/Mgr/mkmflien,v -
trunk/SophyaLib/Mgr/mkmf
r478 r480 1 1 #!/bin/csh 2 # $Id: mkmf,v 1. 3 1999-10-19 10:20:20ansari Exp $2 # $Id: mkmf,v 1.4 1999-10-20 10:25:12 ansari Exp $ 3 3 4 4 # creation de MakefileUser.h a partir de Makefile.h … … 19 19 echo 'LIBS = -L$(LIB)' `sed -e 's/.*/-l&/' libdirs` '-lm' >> GNUmakefile 20 20 echo 'LIBG = -L$(GLB) -lstdc++' >> GNUmakefile 21 echo 'ifeq ($(HOSTTYPE), powerpc)' >> GNUmakefile 22 echo ' LIBG = -L$(GLB)' >> GNUmakefile 23 echo 'endif' >> GNUmakefile 21 24 22 25 cat >> GNUmakefile <<EOF -
trunk/SophyaLib/Mgr/mkmflib
r218 r480 1 1 #!/bin/csh 2 # $Id: mkmflib,v 1. 1.1.1 1999-04-09 17:55:32 ansari Exp $2 # $Id: mkmflib,v 1.2 1999-10-20 10:25:12 ansari Exp $ 3 3 4 4 cd ../$1 … … 48 48 echo $libf ':' \ 49 49 `ls *.{c,cc} | comm -3 -1 $TMPDIR/exclude.sort - | sed -e 's/\.cc/.o/' | sed -e 's/\.c/.o/' | sed -e 's/^/$(OBJ)/'` >> GNUmakefile 50 echo ' $(AR ) $(ARFLAGS) $@ $?' >> GNUmakefile50 echo ' $(ARCXX) $(ARCXXFLAGS) $@ $?' >> GNUmakefile 51 51 # Pour faire compiler les instantiations automatique de cxx (DEC) 52 52 echo 'ifeq ($(CXX),cxx)' >> GNUmakefile -
trunk/SophyaLib/SysTools/pdlmgr.cc
r296 r480 23 23 if ( (path.length() > 0) && (path[path.length()] != '/') ) GetTmpDir() = path + '/'; 24 24 else GetTmpDir() = path; 25 #if defined(OSF1) || defined(Linux) || defined(SunOS) 26 string cmd = "LD_LIBRARY_PATH="; 27 char* varenv=NULL; 28 varenv=getenv("LD_LIBRARY_PATH"); 29 #elif defined(IRIX64) 30 string cmd = "LD_LIBRARYN32_PATH="; 31 char* varenv=NULL; 32 varenv=getenv("LD_LIBRARYN32_PATH"); 33 34 if (varenv == NULL) { 35 cmd += '.'; 36 if (path.length() > 0) cmd += ':' + path; 37 } 38 else { 39 if (varenv[0] != '.') cmd += ".:"; 40 if (path.length() > 0) cmd += path + ':'; 41 cmd += varenv; 42 putenv(cmd.c_str()); 43 } 44 #elif defined(AIX) 45 string cmd = "LIBPATH="; 46 char* varenv=NULL; 47 varenv=getenv("LIBPATH"); 48 if (varenv == NULL) { 49 cmd += '.'; 50 if (path.length() > 0) cmd += ':' + path; 51 cmd += ":/usr/lib:/lib"; 52 } 53 else { 54 if (varenv[0] != '.') cmd += ".:"; 55 if (path.length() > 0) cmd += path + ':'; 56 cmd += varenv; 57 putenv(const_cast<char *>(cmd.c_str())); 58 } 59 60 #endif 25 61 return; 26 62 } … … 49 85 50 86 // Compilation du fichier 51 #if defined(OSF1) || defined(Linux)87 #ifndef __mac__ 52 88 cmd = "cc -c -o " + fnameobj + " " + fname; 89 #else 90 cmd = "Il faut compiler !!!" + fnameobj + " " + fname; 53 91 #endif 54 92 rc = system(cmd.c_str()); … … 68 106 #if defined(OSF1) 69 107 cmd = "ld -shared -o " + fnameso + " -all " + fnameobj + " -none -lm -lc"; 70 #el se108 #elif defined(Linux) 71 109 cmd = "ld -shared -o " + fnameso + " " + fnameobj + " -lm -lc"; 110 #elif defined(SunOS) 111 cmd = "ld -G -o " + fnameso + " " + fnameobj + " -lm -lc"; 112 #elif defined(IRIX64) 113 cmd = "ld -shared -o " + fnameso + " " + fnameobj + " -lm -lc"; 114 #elif defined(AIX) 115 cmd = "ld -G -bnogc -bexpall -bM:1L -o " + fnameso + " " + fnameobj; 116 #elif defined(HPUX) 117 cmd = "ld -b -o " + fnameso + " " + fnameobj + " -lm -lc"; 118 #else 119 cmd = "ld -o " + fnameso + " " + fnameobj + " -lm -lc"; 72 120 #endif 73 121 rc = system(cmd.c_str()); … … 76 124 return(NULL); 77 125 } 78 79 126 PDynLinkMgr* rdyn = new PDynLinkMgr(fnameso, false); 80 127 rdyn->copy = true; … … 117 164 soName = fnameso; 118 165 119 #if defined(OSF1) || defined(Linux) 166 #if defined(HPUX) 167 dlhandle = NULL; 168 cerr << "PDynLinkMgr::PDynLinkMgr() Not yet available on HP-UX " << endl; 169 return; 170 #else 120 171 dlhandle = dlopen(fnameso.c_str(), RTLD_NOW); 121 172 if (dlhandle == NULL) { … … 132 183 PDynLinkMgr::~PDynLinkMgr() 133 184 { 134 #if defined(OSF1) || defined(Linux) 185 #if defined(HPUX) 186 cerr << "PDynLinkMgr::~PDynLinkMgr() Not yet available on HP-UX " << endl; 187 return; 188 #else 135 189 if (dlhandle) dlclose(dlhandle); dlhandle = NULL; 136 #endif137 190 if (copy) { 138 191 string cmd = "rm -f " + soName; 139 192 system(cmd.c_str()); 140 193 } 194 #endif 141 195 } 142 196 … … 145 199 { 146 200 DlFunction f = NULL; 147 #if defined(OSF1) || defined(Linux) 201 #if defined(HPUX) 202 cerr << "PDynLinkMgr::GetFunction() Not yet available on HP-UX " << endl; 203 return f; 204 #else 148 205 if (dlhandle != NULL) 149 206 f = (DlFunction)dlsym(dlhandle, funcname.c_str()); 150 #endif 151 if (f == NULL) cerr << "PDynLinkMgr::PDynLinkMgr(): Error linking " << funcname << endl; 207 if (f == NULL) cerr << "PDynLinkMgr::GetFunction(): Error linking " << funcname << endl; 152 208 return(f); 153 } 154 209 #endif 210 } 211 -
trunk/SophyaLib/SysTools/pdlmgr.h
r241 r480 8 8 #include "machdefs.h" 9 9 #include <string> 10 #if defined(__KCC__)11 using std::string ;12 #endif13 10 14 11 … … 41 38 #if defined(HPUX) 42 39 shl_t dlhandle; 43 #else 40 #else 44 41 void * dlhandle; 45 42 #endif -
trunk/SophyaLib/SysTools/periodic.h
r241 r480 6 6 #include "machdefs.h" 7 7 #include <list> 8 #if defined(__KCC__)9 #include <list.h>10 #endif11 8 12 9 class Periodic; -
trunk/SophyaLib/SysTools/psighand.cc
r245 r480 5 5 #include <signal.h> 6 6 #include "psighand.h" 7 #include "pexceptions.h" 7 #include "pexceptions.h" 8 8 9 using namespace PlanckDPC; 10 11 static bool sigprstate[5] = {false, false, false, false}; 9 static bool sigprstate[6] = {false, false, false, false, false, false}; 12 10 13 11 void PeidaProcessSignal(int s); 14 12 15 13 /* Nouvelle-Fonction */ 16 void PeidaConfigureSignalhandling(bool cfpe, bool csegv, bool c quit, bool cusr1, bool cusr2)14 void PeidaConfigureSignalhandling(bool cfpe, bool csegv, bool cint, bool cquit, bool cusr1, bool cusr2) 17 15 { 18 16 struct sigaction ae, ad; … … 53 51 sigprstate[1] = csegv; 54 52 } 53 54 // SIGINT 55 if (sigprstate[2] != cint) { 56 if (cquit) { 57 sigaction(SIGINT, &ae, NULL); 58 puts("PeidaConfigureSignalhandling(): Activating SIGINT handling (-> throw) ..."); 59 } 60 else { 61 sigaction(SIGINT, &ad, NULL); 62 puts("PeidaConfigureSignalhandling(): Back to default SIGINT handling ..."); 63 } 64 sigprstate[2] = cint; 65 } 66 55 67 // SIGQUIT 56 if (sigprstate[ 2] != cquit) {68 if (sigprstate[3] != cquit) { 57 69 if (cquit) { 58 70 sigaction(SIGQUIT, &ae, NULL); … … 63 75 puts("PeidaConfigureSignalhandling(): Back to default SIGQUIT handling ..."); 64 76 } 65 sigprstate[ 2] = cquit;77 sigprstate[3] = cquit; 66 78 } 67 79 68 80 // SIGUSR1 69 if (sigprstate[ 3] != cusr1) {81 if (sigprstate[4] != cusr1) { 70 82 if (cusr1) { 71 83 sigaction(SIGUSR1, &ae, NULL); … … 76 88 puts("PeidaConfigureSignalhandling(): Back to default SIGUSR1 handling ..."); 77 89 } 78 sigprstate[ 3] = cusr1;90 sigprstate[4] = cusr1; 79 91 } 80 // SIGUSR 181 if (sigprstate[ 4] != cusr2) {92 // SIGUSR2 93 if (sigprstate[5] != cusr2) { 82 94 if (cusr2) { 83 95 sigaction(SIGUSR2, &ae, NULL); … … 88 100 puts("PeidaConfigureSignalhandling(): Back to default SIGUSR2 handling ..."); 89 101 } 90 sigprstate[ 4] = cusr2;102 sigprstate[5] = cusr2; 91 103 } 92 104 } … … 94 106 void PeidaProcessSignal(int s) 95 107 { 108 string msg; 96 109 switch(s) 97 110 { 98 111 case SIGFPE : 99 112 puts("PeidaProcessSignal: ###Signal SIGFPE catched, throw catchedSIGFPE ###"); 100 throw CaughtSignalExc("SIGFPE"); 113 msg = "Caught SIGFPE"; 114 throw ( CaughtSignalExc(msg, s) ); 101 115 case SIGSEGV : 102 116 puts("PeidaProcessSignal: ###Signal SIGSEGV catched, throw catchedSIGSEGV ###"); 103 throw CaughtSignalExc("SIGSEGV"); 117 msg = "Caught SIGSEGV"; 118 throw ( CaughtSignalExc(msg, s) ); 104 119 case SIGINT : 105 120 puts("PeidaProcessSignal: ###Signal SIGINT catched, throw catchedSIGINT ###"); 106 throw CaughtSignalExc("SIGINT"); 121 msg = "Caught SIGINT"; 122 throw ( CaughtSignalExc(msg, s) ); 107 123 case SIGQUIT : 108 124 puts("PeidaProcessSignal: ###Signal SIGQUIT catched, throw catchedSIGQUIT ###"); 109 throw CaughtSignalExc("SIGQUIT"); 125 msg = "Caught SIGQUIT"; 126 throw ( CaughtSignalExc(msg, s) ); 110 127 case SIGUSR1 : 111 128 puts("PeidaProcessSignal: ###Signal SIGUSR1 catched, throw catchedSIGUSR1 ###"); 112 throw CaughtSignalExc("SIGUSR1"); 129 msg = "Caught SIGUSR1"; 130 throw ( CaughtSignalExc(msg, s) ); 113 131 case SIGUSR2 : 114 132 puts("PeidaProcessSignal: ###Signal SIGUSR2 catched, throw catchedSIGUSR2 ###"); 115 throw CaughtSignalExc("SIGUSR2"); 133 msg = "Caught SIGUSR2"; 134 throw ( CaughtSignalExc(msg, s) ); 116 135 default : 117 136 printf("PeidaProcessSignal: ###Signal %d catched, throw inconsistentErr ### \n", s); 118 throw CaughtSignalExc("???"); 137 msg = "Caught SIG???"; 138 throw ( CaughtSignalExc(msg, s) ); 119 139 } 140 141 // return; 120 142 } -
trunk/SophyaLib/SysTools/psighand.h
r241 r480 6 6 7 7 #include "machdefs.h" 8 void PeidaConfigureSignalhandling(bool cfpe=false, bool csegv=false, bool cquit=false, bool cusr1=false, bool cusr2=false); 8 void PeidaConfigureSignalhandling(bool cfpe=false, bool csegv=false, 9 bool cint=false, bool cquit=false, 10 bool cusr1=false, bool cusr2=false); 9 11 #endif
Note:
See TracChangeset
for help on using the changeset viewer.