Changeset 4106
- Timestamp:
- Jun 3, 2005, 1:48:38 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 2 edited
-
dataIO/psDB.c (modified) (3 diffs)
-
db/psDB.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataIO/psDB.c
r4043 r4106 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 5-28 01:01:32$14 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-03 23:48:38 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 23 23 #include <stdarg.h> 24 24 #include <string.h> 25 #undef __STRICT_ANSI__ 25 26 #include <stdlib.h> 27 #define __STRICT_ANSI__ 26 28 #include <math.h> 27 29 #include <mysql.h> … … 807 809 : NULL; 808 810 } else if (item->type == PS_TYPE_BOOL) { 811 // XXX: ASC HACK NOTE (2005/06/03): set extreme bytes to the 812 // boolean character value. sizeof(psBool)==4 which triggers an 813 // endianess issue in the MySQL conversion (reading only 1 byte), 814 // on Macintosh hardware (and maybe others?) 815 unsigned int c = (unsigned int)item->data.B; 816 item->data.S32 = (unsigned int)((c<<24) | c); 809 817 bind[i].length = 0; 810 818 bind[i].buffer = &item->data.B; -
trunk/psLib/src/db/psDB.c
r4043 r4106 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-0 5-28 01:01:32$14 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-06-03 23:48:38 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 23 23 #include <stdarg.h> 24 24 #include <string.h> 25 #undef __STRICT_ANSI__ 25 26 #include <stdlib.h> 27 #define __STRICT_ANSI__ 26 28 #include <math.h> 27 29 #include <mysql.h> … … 807 809 : NULL; 808 810 } else if (item->type == PS_TYPE_BOOL) { 811 // XXX: ASC HACK NOTE (2005/06/03): set extreme bytes to the 812 // boolean character value. sizeof(psBool)==4 which triggers an 813 // endianess issue in the MySQL conversion (reading only 1 byte), 814 // on Macintosh hardware (and maybe others?) 815 unsigned int c = (unsigned int)item->data.B; 816 item->data.S32 = (unsigned int)((c<<24) | c); 809 817 bind[i].length = 0; 810 818 bind[i].buffer = &item->data.B;
Note:
See TracChangeset
for help on using the changeset viewer.
