diff options
author | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-07-13 02:53:26 +0000 |
---|---|---|
committer | gram <gram@f5534014-38df-0310-8fa8-9805f1628bb7> | 1999-07-13 02:53:26 +0000 |
commit | 5ac565b736a239c22d34ffb75b39a98a60e31c09 (patch) | |
tree | 4ddecf128133922607a7f2d194c4d36601690f1e /prefs.c | |
parent | d26a8c8fd438ea5d6be78eb1779876ea507429f6 (diff) |
Added support for compiling on win32 with Visual C and 'nmake'. It compiles,
but does not link. Perhaps someone who understands the MS tools can help
out. I made it link a few months ago, but with different version of glib/gtk+.
I can't remember how I made it link.
Most of the compatibility issues were resolved with adding
#ifdef HAVE_UNISTD_H the the source code. Please be sure to add this to all
future code.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@359 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'prefs.c')
-rw-r--r-- | prefs.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* prefs.c * Routines for handling preferences * - * $Id: prefs.c,v 1.18 1999/06/21 19:04:35 gram Exp $ + * $Id: prefs.c,v 1.19 1999/07/13 02:52:57 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -31,12 +31,20 @@ #include <sys/types.h> #endif +#ifdef HAVE_DIRECT_H +#include <direct.h> +#endif + #include <gtk/gtk.h> #include <stdlib.h> #include <ctype.h> #include <errno.h> + +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif + #include <sys/stat.h> #include "ethereal.h" @@ -484,7 +492,11 @@ write_prefs() { sprintf(pf_path, "%s/%s", getenv("HOME"), PF_DIR); if (stat(pf_path, &s_buf) != 0) +#ifdef WIN32 + mkdir(pf_path); +#else mkdir(pf_path, 0755); +#endif sprintf(pf_path, "%s/%s/%s", getenv("HOME"), PF_DIR, PF_NAME); if ((pf = fopen(pf_path, "w")) == NULL) { |