diff options
author | Zoltan Varga <vargaz@gmail.com> | 2004-03-05 17:22:35 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2004-03-05 17:22:35 +0300 |
commit | b8dca148810074a440b0d7d35f83e3719cbf068e (patch) | |
tree | 868d82ae281723e5783c811ccc760f5e29be19bf /mcs/jay | |
parent | 2bea408805cf511f59b58ceb045efb52224b3cb2 (diff) |
2004-03-05 Zoltan Varga <vargaz@freemail.hu>
* main.c: Applied patch from Albert Strasheim (13640887@sun.ac.za).
Fix compilation under mingw.
svn path=/trunk/mcs/; revision=23737
Diffstat (limited to 'mcs/jay')
-rwxr-xr-x | mcs/jay/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/jay/main.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/mcs/jay/ChangeLog b/mcs/jay/ChangeLog index db057fad41f..9e24573e72f 100755 --- a/mcs/jay/ChangeLog +++ b/mcs/jay/ChangeLog @@ -1,3 +1,8 @@ +2004-03-05 Zoltan Varga <vargaz@freemail.hu> + + * main.c: Applied patch from Albert Strasheim (13640887@sun.ac.za). + Fix compilation under mingw. + 2004-02-07 Miguel de Icaza <miguel@ximian.com> * skeleton.cs: Report the token that we errored on; Helps diff --git a/mcs/jay/main.c b/mcs/jay/main.c index 0ffddcf2237..515a70a2de3 100644 --- a/mcs/jay/main.c +++ b/mcs/jay/main.c @@ -91,7 +91,13 @@ char *rassoc; short **derives; char *nullable; +#if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) +extern char* mktemp(); +#define mkstemp mktemp +#else extern char *mkstemp(); +#endif + extern char *getenv(); done(k) @@ -253,8 +259,12 @@ create_file_names() int i, len; char *tmpdir; +#if defined(_WIN32) && !defined(__CYGWIN32__) && !defined(__CYGWIN__) + tmpdir = "."; +#else tmpdir = getenv("TMPDIR"); if (tmpdir == 0) tmpdir = "/tmp"; +#endif len = strlen(tmpdir); i = len + 13; |