# HG changeset patch # User mas01cr # Date 1255522359 0 # Node ID 5b2c0d9bc63d9481fe8f04a75c8bf667b14c04ae # Parent 6d5d4c733781ec4276e00e28d97067c33b6f9f90 Broken implementation of mkstemp() for WIN32 (no-cygwin) Since the only user is the SOAP server, and since I would strongly like to see the SOAP server either removed completely or else written to call the API rather than a fake-command-line-emulation, I'm not too worried about the brokenness. YMMV. diff -r 6d5d4c733781 -r 5b2c0d9bc63d soap.cpp --- a/soap.cpp Wed Oct 14 12:12:37 2009 +0000 +++ b/soap.cpp Wed Oct 14 12:12:39 2009 +0000 @@ -379,6 +379,15 @@ } } +#if defined(WIN32) +int mkstemp(char *tmpFileName) { + int fd = -1; + mktemp(tmpFileName); + fd = open(tmpFileName,O_RDWR|O_BINARY|O_CREAT|O_EXCL, _S_IREAD|_S_IWRITE); + return fd; +} +#endif + // Query an audioDB database by vector (serialized) int adb__shingleQuery(struct soap* soap, xsd__string dbName, struct adb__queryVector qVector, xsd__string keyList, xsd__string timesFileName, xsd__int queryType, xsd__int queryPos, xsd__int pointNN, xsd__int trackNN, xsd__int sequenceLength, xsd__double radius, xsd__double absolute_threshold, xsd__double relative_threshold, xsd__int exhaustive, xsd__int lsh_exact, xsd__int no_unit_norming, struct adb__queryResponse &adbQueryResponse){