[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10508 - Extractor/src/main
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10508 - Extractor/src/main |
Date: |
Mon, 8 Mar 2010 11:49:04 +0100 |
Author: grothoff
Date: 2010-03-08 11:49:04 +0100 (Mon, 08 Mar 2010)
New Revision: 10508
Modified:
Extractor/src/main/extractor.c
Log:
fixing IPC for FreeBSD
Modified: Extractor/src/main/extractor.c
===================================================================
--- Extractor/src/main/extractor.c 2010-03-08 10:32:28 UTC (rev 10507)
+++ Extractor/src/main/extractor.c 2010-03-08 10:49:04 UTC (rev 10508)
@@ -1486,14 +1486,22 @@
size_t fn_size,
size_t size)
{
+ const char *tpath;
+
+#ifdef WINDOWS
+ tpath = "%TEMP%\\";
+#elif SOMEBSD
+ /* this works on FreeBSD, not sure about others... */
+ tpath = getenv ("TMPDIR");
+ if (tpath == NULL)
+ tpath = "/tmp/";
+#else
+ tpath = "/"; /* Linux */
+#endif
snprintf (fn,
fn_size,
-#ifdef WINDOWS
- "%TEMP%\\"
-#else
- "/"
-#endif
- "libextractor-%sshm-%u-%u",
+ "%slibextractor-%sshm-%u-%u",
+ tpath,
(is_tail) ? "t" : "",
getpid(),
(unsigned int) RANDOM());
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10508 - Extractor/src/main,
gnunet <=