Florian Forster writes: > since all XSI compliant systems are required to provide thread- and > reentrant-safe functions, those functions are fortunately available on > the vast majority of systems. > > So if you compile with > CPPFLAGS="-D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=500 -D_REENTRANT > -D_THREAD_SAFE" > you should get the XS-interface on all noted platforms, as far as I > know. > > Of course, there are the occasional oddities here and there, as with all > ``modern'' interfaces. For example, under Solaris, if you don't specify > the above flags, you need to at least specify > CPPFLAGS="-D_POSIX_PTHREAD_SEMANTICS" > to get the standard-conforming versions of some functions, such as > `strtok_r'. >
Would you please provide some pointers to these switches? Are they gcc-specific in any way? I'd like to add something like this to configure.in. > Please consider the attached patch. It's against what I considered to be > the current CVS revision, but I haven't CVS for quite some time, so > please forgive me if I'm a bit off ;) > Thanks for the patch, this saved me quite a bit of my time. I've applied the patch with the following minor edits: - dbi_initialize_r must not return the value of status (which is set to the value of ERRNO in case of a failure). These are positive integers and cannot be distinguished by the caller from a successful execution loading that many drivers. num_loaded better reflects the success of the function call as it is zero if readdir_r fails, indicating that no drivers were loaded. - I've used a more portable way to calculate the buffer size required for readdir_r, see http://womble.decadentplace.org.uk/readdir_r-advisory.html - I've fixed an obvious typo in the timegm.c patch (gmtime_r vs. gmtime) > I did not remove that ugly `strtok == strtok_r' hack in > src/dbi_result.c, but I added a warning to it. Is that really necessary? > Apparently yes. I've found no hints on the web that MINGW now has strtok_r. I've checked in the above changes. I'd like to get some feedback from non-FreeBSD systems. regards, Markus -- Markus Hoenicka [EMAIL PROTECTED] (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ libdbi-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libdbi-devel

