Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1312 Modified Files: cimXmlGen.c cimXmlRequest.c configure.ac instance.c objectImpl.c providerMgr.c sqlStatement.c support.c trace.c Log Message: Bugs fixed: 1237336. Added CPU recognition to configure.ac. Replaced calls to asm by a macro SFCB_ASM that expands to asm only for x86 hosts. Index: trace.c =================================================================== RCS file: /cvsroot/sblim/sfcb/trace.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- trace.c 20 Jun 2005 13:09:44 -0000 1.5 +++ trace.c 13 Jul 2005 14:26:02 -0000 1.6 @@ -33,6 +33,7 @@ #include <sys/resource.h> #include <sys/types.h> #include <unistd.h> +#include "config.h" /* ---------------------------------------------------------------------------*/ /* trace facility */ @@ -170,6 +171,7 @@ void _sfcb_trap(int tn) { +#ifdef SFCB_IX86 char *tp; int t; if ((tp = getenv("SFCB_TRAP"))) { @@ -177,6 +179,7 @@ if (tn == t) asm("int $3"); } +#endif } sigHandler *setSignal(int sn, sigHandler * sh, int flags) Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- configure.ac 8 Jul 2005 14:01:51 -0000 1.14 +++ configure.ac 13 Jul 2005 14:26:02 -0000 1.15 @@ -82,6 +82,13 @@ ;; **) AC_MSG_ERROR([$ac_cv_host is not a supported platform, sorry.]) esac + + +case $host_cpu in + i*86) AC_DEFINE(SFCB_IX86,1,[Intel i386 CPU]) + ;; +esac + AC_SUBST(SFCB_CMPI_PLATFORM) AC_SUBST(SFCB_CMPI_OS) @@ -134,7 +141,7 @@ then INIT_STYLE=init-suse else - INIT_STYLE=init-generic + INIT_STYLE=init-none fi AC_SUBST(INIT_STYLE) Index: cimXmlGen.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlGen.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- cimXmlGen.c 20 Jun 2005 23:59:24 -0000 1.10 +++ cimXmlGen.c 13 Jul 2005 14:26:01 -0000 1.11 @@ -36,6 +36,13 @@ #include "string.h" #include "queryOperation.h" +#include "config.h" + +#ifdef SFCB_IX86 +#define SFCB_ASM(x) asm(x) +#else +#define SFCB_ASM(x) +#endif extern const char *instGetClassName(CMPIInstance * ci); extern CMPIData opGetKeyCharsAt(CMPIObjectPath * cop, unsigned int index, @@ -195,7 +202,7 @@ } mlogf(M_ERROR,M_SHOW,"%s(%d): invalid data type %d %x\n", __FILE__, __LINE__, (int) type, (int) type); - asm("int $3"); + SFCB_ASM("int $3"); abort(); return "*??*"; } @@ -222,7 +229,7 @@ } mlogf(M_ERROR,M_SHOW,"%s(%d): invalid key data type %d %x\n", __FILE__, __LINE__, (int) type, (int) type); - asm("int $3"); + SFCB_ASM("int $3"); abort(); return "*??*"; } Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- cimXmlRequest.c 26 Jun 2005 21:52:08 -0000 1.13 +++ cimXmlRequest.c 13 Jul 2005 14:26:02 -0000 1.14 @@ -37,6 +37,13 @@ #include "string.h" #include "queryOperation.h" +#include "config.h" + +#ifdef SFCB_IX86 +#define SFCB_ASM(x) asm(x) +#else +#define SFCB_ASM(x) +#endif typedef struct handler { RespSegments(*handler) (CimXmlRequestContext *, RequestHdr * hdr); @@ -390,7 +397,7 @@ _SFCB_ENTER(TRACE_CIMXMLPROC, "genEnumResponses"); ar = NewCMPIArray(arrLen, binCtx->type, NULL); -//asm("int $3"); +//SFCB_ASM("int $3"); for (c = 0, i = 0; i < binCtx->rCount; i++) { for (j = 0; j < resp[i]->count; c++, j++) { if (binCtx->type == CMPI_ref) Index: instance.c =================================================================== RCS file: /cvsroot/sblim/sfcb/instance.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- instance.c 12 Jul 2005 22:46:55 -0000 1.10 +++ instance.c 13 Jul 2005 14:26:02 -0000 1.11 @@ -29,6 +29,13 @@ #include "native.h" #include "objectImpl.h" +#include "config.h" + +#ifdef SFCB_IX86 +#define SFCB_ASM(x) asm(x) +#else +#define SFCB_ASM(x) +#endif extern int ClInstanceGetPropertyAt(ClInstance * inst, int id, CMPIData * data, char **name, unsigned long *quals); @@ -469,7 +476,7 @@ else { j=0; - asm("int $3"); + SFCB_ASM("int $3"); ns = "*NoNameSpace*"; cn = "*NoClassName*"; tmp1.rc=tmp2.rc=tmp3.rc=CMPI_RC_OK; Index: support.c =================================================================== RCS file: /cvsroot/sblim/sfcb/support.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- support.c 26 Apr 2005 21:58:47 -0000 1.6 +++ support.c 13 Jul 2005 14:26:02 -0000 1.7 @@ -30,6 +30,13 @@ #include <errno.h> #include "native.h" #include "trace.h" +#include "config.h" + +#ifdef SFCB_IX86 +#define SFCB_ASM(x) asm(x) +#else +#define SFCB_ASM(x) +#endif int collectStat=0; unsigned long exFlags = 0; @@ -393,7 +400,7 @@ void *result = calloc(1, size); if (!result) { _SFCB_TRACE(1,("--- tool_mm_alloc error %u %d\n", size, currentProc)) - asm("int $3"); + SFCB_ASM("int $3"); abort(); } __ALLOC_ERROR(!result); @@ -411,7 +418,7 @@ void *result = calloc(1, size); if (!result) { _SFCB_TRACE(1,("--- memAlloc %u %d\n", size, currentProc)) - asm("int $3"); + SFCB_ASM("int $3"); abort(); } __ALLOC_ERROR(!result); Index: sqlStatement.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sqlStatement.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sqlStatement.c 3 Jun 2005 10:31:57 -0000 1.1 +++ sqlStatement.c 13 Jul 2005 14:26:02 -0000 1.2 @@ -7,12 +7,18 @@ #include "objectImpl.h" #include "cmpimacs.h" - +#include "config.h" #include <stdio.h> #include <string.h> #include <malloc.h> +#ifdef SFCB_IX86 +#define SFCB_ASM(x) asm(x) +#else +#define SFCB_ASM(x) +#endif + #define SbS sbs = (SubSelect*)this->cnode; sbs #define FS fs = (FullSelect*)this->cnode; fs @@ -538,7 +544,7 @@ } printf("%s(%d): invalid data type %d %x\n", __FILE__, __LINE__, (int) type, (int) type); - asm("int $3"); + SFCB_ASM("int $3"); abort(); return "*??*"; } @@ -591,7 +597,7 @@ } printf("%s(%d): invalid data type %d %x\n", __FILE__, __LINE__, (int) type, (int) type); - asm("int $3"); + SFCB_ASM("int $3"); abort(); return "*??*"; } Index: objectImpl.c =================================================================== RCS file: /cvsroot/sblim/sfcb/objectImpl.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- objectImpl.c 13 Jun 2005 23:37:31 -0000 1.8 +++ objectImpl.c 13 Jul 2005 14:26:02 -0000 1.9 @@ -28,6 +28,13 @@ #include "array.h" #include "utilft.h" #include "trace.h" +#include "config.h" + +#ifdef SFCB_IX86 +#define SFCB_ASM(x) asm(x) +#else +#define SFCB_ASM(x) +#endif //#define DEB(x) x #define DEB(x) @@ -2180,7 +2187,7 @@ int main() { int val = 37, s; - // asm("int $3"); + // SFCB_ASM("int $3"); { CMPIObjectPath *cop = NewCMPIObjectPath("root", "myClass", NULL); CMPIInstance *inst = NewCMPIInstance(cop, NULL); Index: providerMgr.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- providerMgr.c 13 Jun 2005 23:37:31 -0000 1.12 +++ providerMgr.c 13 Jul 2005 14:26:02 -0000 1.13 @@ -36,6 +36,13 @@ #include "trace.h" #include "queryOperation.h" #include "selectexp.h" +#include "config.h" + +#ifdef SFCB_IX86 +#define SFCB_ASM(x) asm(x) +#else +#define SFCB_ASM(x) +#endif extern CMPIBroker *Broker; @@ -903,7 +910,7 @@ rc=spSendReq(&ctx->provA.socket, &resultSockets.send, buf, l); if (rc==-2) { mlogf(M_ERROR,M_SHOW,"--- need to reload provider ??\n"); - asm("int $3"); + SFCB_ASM("int $3"); // reloadProviderRequest(ctx); exit(3); } |