Hi, I am currently trying to compile libdbi on Windows (win32) using MinGW/MSYS. I got the compilation to complete except for the Oracle driver, which calls strptime in dbd_oracle.c. This function is not available on my platform. However, when looking into dbd_oracle.c I see strptime is used after a sprintf to convert date/time values using a string. So I would propose to change:
char stime[101], *cp = NULL; memset(stime, 0, sizeof(stime)); sprintf(stime, "%04d%02d%02d%02d%02d%02d", // | YYYY | (obuff[0]-100)*100 + (obuff[1]-100), // | month | day | obuff[2], obuff[3], // | HH | MM | SS | obuff[4]-1, obuff[5]-1, obuff[6]-1); cp = strptime(stime, "%Y%m%d%H%M%S", &tmt); into: memset(&tmt, 0, sizeof(tmt)); tmt.tm_sec = obuff[6]-1; tmt.tm_min = obuff[5]-1; tmt.tm_hour = obuff[4]-1; tmt.tm_mday = obuff[3]; tmt.tm_mon = obuff[2]; tmt.tm_year = (obuff[0]-100)*100 + (obuff[1]-100); This way you get rid of the step where a string is first constructed and then parsed. I haven't tested this though, but it does compile now on my system. Are you willing to consider this change? If you are interested in other change needed to support MinGW/MSYS compatibility, let me know and I'll be glad to send more information. Regards Brecht Sanders ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel