path: root/mkstemp.c
diff options
authorGilbert Ramirez <gram@alumni.rice.edu>2000-01-15 00:23:13 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-01-15 00:23:13 +0000
commit339d67b043a1f1ac860b84ed48ec6ba77d96f487 (patch)
tree0ab0f799055b6e6bb48ddc02d21fa608874b4ee4 /mkstemp.c
parentdbf3bf6177946f2e21efdb7a64ec32c8ee02eb74 (diff)
Merge in the final code to make Ethereal run on Win32, compiled
with MSVC 6.0 and 'nmake', the make tool that comes with MSVC. It compiles, links, and runs. It doesn't run correctly. There's a problem when reading files. I'm getting short reads. I'm not linking in zlib or libsnmp because it first needs to be debugged. I changed the plugin code to use gmodule instead of libltdl, but the Unix build still links ethereal against libltdl. I'll fix that tonight; sorry about leaving it in such a sad state, but I wanted to check in this code before I left work on a Friday night. Ethereal still works, but the building is less than optimal. svn path=/trunk/; revision=1479
Diffstat (limited to 'mkstemp.c')
1 files changed, 11 insertions, 0 deletions
diff --git a/mkstemp.c b/mkstemp.c
index 7bb4ea32b7..3245cff177 100644
--- a/mkstemp.c
+++ b/mkstemp.c
@@ -16,12 +16,22 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#include <unistd.h>
#ifndef __set_errno
#define __set_errno(x) errno=(x)
@@ -64,6 +74,7 @@ mkstemp (template)
/* We return the null string if we can't find a unique file name. */
template[0] = '\0';
return -1;