Hi Jiri,

On 11.12.2008, at 23:26, Ji?? ?im?a wrote:
> Has any of you successfully compiled on OS X (Darwin Kernel Version  
> 9.5.0)? Thanks.

I've tried it once. Some of the compilation errors could be fixed
by minor manual changes, but I didn't know how to fix the issues with
__ctype_* functions (it seems taht they aren't available on Mac OS X):

In lib/Executor.cpp

#ifndef WINDOWS
   /* From /usr/include/errno.h: it [errno] is a per-thread variable. */
   int *errno_addr = __errno_location();
   addExternalObject(state, (void *)errno_addr, sizeof *errno_addr, 0,  
false);

   /* from /usr/include/ctype.h:
        These point into arrays of 384, so they can be indexed by any  
`unsigned
        char' value [0,255]; by EOF (-1); or by any `signed char' value
        [-128,-1).  ISO C requires that the ctype functions work for  
`unsigned */
     // XXX: there is some confusion over whether starts at *addr or  
*addr-128
   let(addr, __ctype_b_loc());
   MemoryObject *ref = 0;
   ref = addExternalObject(state, (void *)(*addr-128), 384 * sizeof  
**addr, 0, true);
   addExternalObject(state, addr, 4, ref, true);

   let(lower_addr, __ctype_tolower_loc());
   ref = addExternalObject(state, (void *)(*lower_addr-128), 384 *  
sizeof **lower_addr, 0, true);
   addExternalObject(state, lower_addr, 4, ref, true);

   let(upper_addr, __ctype_toupper_loc());
   ref = addExternalObject(state, (void *)(*upper_addr-128), 384 *  
sizeof **upper_addr, 0, true);
   addExternalObject(state, upper_addr, 4, ref, true);
#endif



- Raimondas

--
Raimondas Sasnauskas, PhD Student
Distributed Systems Group
RWTH Aachen University
http://ds.cs.rwth-aachen.de/members/sasnauskas






-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2498 bytes
Desc: not available
Url : 
http://keeda.Stanford.EDU/pipermail/klee-dev/attachments/20081212/3308e33c/attachment.bin
 

Reply via email to