* of the GNU Lesser General Public License.
*/
-#include "ucw/lib.h"
-#include "ucw/conf.h"
-#include "ucw/threads.h"
-#include "ucw/lfs.h"
-#include "ucw/fastbuf.h"
+#include <ucw/lib.h>
+#include <ucw/conf.h>
+#include <ucw/threads.h>
+#include <ucw/io.h>
+#include <ucw/fastbuf.h>
#include <stdio.h>
#include <unistd.h>
struct timeval tv;
if (gettimeofday(&tv, NULL))
die("gettimeofday() failed: %m");
- len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%u", dir, temp_prefix, (uns) tv.tv_usec);
+ len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%u", dir, temp_prefix, (uint) tv.tv_usec);
if (open_flags)
*open_flags = O_EXCL;
}
struct ucwlib_context *ctx = ucwlib_thread_context();
int cnt = ++ctx->temp_counter;
int pid = getpid();
- if (ctx->thread_id == pid)
+ if (ucwlib_thread_id(ctx) == pid)
len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%d-%d", dir, temp_prefix, pid, cnt);
else
- len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%d-%d-%d", dir, temp_prefix, pid, ctx->thread_id, cnt);
+ len = snprintf(name_buf, TEMP_FILE_NAME_LEN, "%s/%s%d-%d-%d", dir, temp_prefix, pid, ucwlib_thread_id(ctx), cnt);
if (open_flags)
*open_flags = 0;
}
#ifdef TEST
-#include "ucw/getopt.h"
+#include <ucw/getopt.h>
int main(int argc, char **argv)
{