From: Narasimha S. <nsh...@us...> - 2011-09-09 16:39:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 9eae8745aae577ffd227553516f2282d578f7075 (commit) from 09035e501fb18f007e841e82017d30ce97408e96 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9eae8745aae577ffd227553516f2282d578f7075 Author: Narasimha Sharoff <nsh...@us...> Date: Fri Sep 9 09:36:53 2011 -0700 [3310192] 32bit sfcbmof fails to run under x86_64 ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 7a20d98..47fdedd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-09 Narasimha Sharoff <nsh...@us...> + + * mofc/backend_sfcb.c objectImplSwapI32toP32.c + [ 3310192 ] 32bit sfcbmof fails to run under x86_64 + Initial patch from Chris Poblete, reworked by Narasimha Sharoff + 2011-09-06 Michael Chase-Salerno <br...@li...> * httpAdapter.c, sfcb.cfg.pre.in, control.c: diff --git a/NEWS b/NEWS index 3e33140..6ff0072 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ Bugs fixed: - 3300167 Memory leaks caused by cimRequest changes - 3101157 Failed to enable provider timing analysis with SfcbLocal - 3400114 sfcb fails to start with ipv6 disabled +- 3310192 32bit sfcbmof fails to run x86_64 Changes in 1.4.1 ================ diff --git a/objectImplSwapI32toP32.c b/objectImplSwapI32toP32.c index 63d3a39..37168db 100644 --- a/objectImplSwapI32toP32.c +++ b/objectImplSwapI32toP32.c @@ -506,20 +506,14 @@ swapI32toP32Class(ClClass * cls, int *size) ClObjectHdr *hdr = &cls->hdr; int ofs = sizeof(CLP32_ClClass); int sz = p32SizeClassH(hdr, cls) + CLEXTRA; - struct utsname uName; - static int first = 1; // char *cn; - if (first) { - uname(&uName); - - if (uName.machine[0] != 'i' || strcmp(uName.machine + 2, "86") != 0) { +#if (__WORDSIZE !=32) || !defined (__i386__) || (__x86_64__ ) fprintf(stderr, - "--- swapI32toP32Class can only execute on ix86 machines\n"); + "--- swapI32toP32Class can only execute on ix86 built 32bit binary\n"); exit(16); - } - first = 0; - } +#endif // __i386__ + // cn=(char*)ClObjectGetClString(&cls->hdr, &cls->name); CLP32_ClClass *nc = (CLP32_ClClass *) calloc(1, sz); @@ -557,19 +551,11 @@ swapI32toP32Instance(ClInstance * inst, int *size) ClObjectHdr *hdr = &inst->hdr; int ofs = sizeof(CLP32_ClInstance); int sz = p32SizeInstanceH(hdr, inst) + CLEXTRA; - struct utsname uName; - static int first = 1; - - if (first) { - uname(&uName); - if (uName.machine[0] != 'i' || strcmp(uName.machine + 2, "86") != 0) { +#if (__WORDSIZE != 32) && !defined (__i386__) || (__x86_64__) fprintf(stderr, - "--- swapI32toP32Instance can only execute on ix86 machines\n"); - exit(16); - } - first = 0; - } + "--- swapI32toP32Instance can only execute on ix86 built 32bit binary\n"); +#endif // __i386__ CLP32_ClInstance *ni = (CLP32_ClInstance *) calloc(1, sz); @@ -603,19 +589,13 @@ swapI32toP32QualifierDeclaration(ClQualifierDeclaration * qual, int *size) ClObjectHdr *hdr = &qual->hdr; int ofs = sizeof(CLP32_ClQualifierDeclaration); int sz = p32SizeQualifierH(hdr, qual) + CLEXTRA; - struct utsname uName; - static int first = 1; - if (first) { - uname(&uName); - if (uName.machine[0] != 'i' || strcmp(uName.machine + 2, "86") != 0) { +#if (__WORDSIZE !=32) || !defined (__i386__) || (__x86_64__ ) fprintf(stderr, "--- swapI32toP32QualifierDeclaration can only execute on ix86 machines\n"); exit(16); - } - first = 0; - } +#endif // __i386 __ CLP32_ClQualifierDeclaration *nq = (CLP32_ClQualifierDeclaration *) calloc(1, sz); hooks/post-receive -- SFCB - Small Footprint CIM Broker |