diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-05-24 06:36:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:08:32 -0500 |
commit | 574daba7951b64b6b877db55a92e5a66f3354b4f (patch) | |
tree | dca7ba77a419ee00c5dead30e04d0bc32b5dccb0 /source4/param | |
parent | 3372344ade7e2610b8ba7d3175465656847affd7 (diff) | |
download | samba-574daba7951b64b6b877db55a92e5a66f3354b4f.tar.gz samba-574daba7951b64b6b877db55a92e5a66f3354b4f.tar.bz2 samba-574daba7951b64b6b877db55a92e5a66f3354b4f.zip |
r15851: the conversion of loadparm to BOOL broke all big-endian platforms as
the service and global declarations were left as int. I tried to fix
this initially by fixing the service declarations, but it didn't
work. While I investigate why, this patch at least gets the use of int
right, and should give big-endian platforms a chance
(This used to be commit e12ae809eaf0a4c48ebb086615a9051b59996b5a)
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/loadparm.c | 10 | ||||
-rw-r--r-- | source4/param/loadparm.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 183cec802d..3d33da2bcd 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -784,7 +784,7 @@ static const char *lp_string(const char *s) #define FN_GLOBAL_LIST(fn_name,ptr) \ const char **fn_name(void) {return(*(const char ***)(ptr));} #define FN_GLOBAL_BOOL(fn_name,ptr) \ - BOOL fn_name(void) {return(*(BOOL *)(ptr));} + BOOL fn_name(void) {return((BOOL)*(int *)(ptr));} #define FN_GLOBAL_CHAR(fn_name,ptr) \ char fn_name(void) {return(*(char *)(ptr));} #define FN_GLOBAL_INTEGER(fn_name,ptr) \ @@ -1443,7 +1443,7 @@ static void copy_service(service * pserviceDest, service * pserviceSource, int * switch (parm_table[i].type) { case P_BOOL: - *(BOOL *)dest_ptr = *(BOOL *)src_ptr; + *(int *)dest_ptr = *(int *)src_ptr; break; case P_INTEGER: @@ -2035,7 +2035,7 @@ static void print_parameter(struct parm_struct *p, void *ptr, FILE * f) break; case P_BOOL: - fprintf(f, "%s", BOOLSTR(*(BOOL *)ptr)); + fprintf(f, "%s", BOOLSTR((BOOL)*(int *)ptr)); break; case P_INTEGER: @@ -2072,7 +2072,7 @@ static BOOL equal_parameter(parm_type type, void *ptr1, void *ptr2) { switch (type) { case P_BOOL: - return (*((BOOL *)ptr1) == *((BOOL *)ptr2)); + return (*((int *)ptr1) == *((int *)ptr2)); case P_INTEGER: case P_BYTES: @@ -2162,7 +2162,7 @@ static BOOL is_default(int i) *(char **)parm_table[i].ptr); case P_BOOL: return parm_table[i].def.bvalue == - *(BOOL *)parm_table[i].ptr; + *(int *)parm_table[i].ptr; case P_INTEGER: case P_BYTES: case P_ENUM: diff --git a/source4/param/loadparm.h b/source4/param/loadparm.h index 5e3bcea523..d439a435e6 100644 --- a/source4/param/loadparm.h +++ b/source4/param/loadparm.h @@ -51,7 +51,7 @@ struct parm_struct { const struct enum_list *enum_list; unsigned int flags; union { - BOOL bvalue; + int bvalue; int ivalue; char *svalue; char cvalue; |