aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2010-11-20 09:47:13 -0800
committerLev Walkin <vlm@lionet.info>2010-11-20 09:47:13 -0800
commit936595643a2a71f6ef3e50cb7c71734e30b20b2f (patch)
treeee1cf23b7ea1bda9118d877dfa125f6227310846 /libasn1compiler
parent464166ca446b5cc46037bbadfa069743a4e18498 (diff)
WIN32 -> _WIN32; see http://predef.sourceforge.net/preos.html#sec25
Diffstat (limited to 'libasn1compiler')
-rw-r--r--libasn1compiler/asn1c_compat.c10
-rw-r--r--libasn1compiler/asn1c_internal.h2
-rw-r--r--libasn1compiler/asn1c_save.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/libasn1compiler/asn1c_compat.c b/libasn1compiler/asn1c_compat.c
index 17dd9068..724124c3 100644
--- a/libasn1compiler/asn1c_compat.c
+++ b/libasn1compiler/asn1c_compat.c
@@ -6,7 +6,7 @@
#endif
#ifndef DEFFILEMODE /* Normally in <sys/stat.h> */
-#ifdef WIN32
+#ifdef _WIN32
#define DEFFILEMODE (S_IREAD|S_IWRITE)
#else
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
@@ -21,7 +21,7 @@
FILE *
asn1c_open_file(const char *name, const char *ext, char **opt_tmpname) {
int created = 1;
-#ifndef WIN32
+#ifndef _WIN32
struct stat sb;
#endif
char *fname;
@@ -44,7 +44,7 @@ asn1c_open_file(const char *name, const char *ext, char **opt_tmpname) {
* Create temporary file.
*/
fd = mkstemp(fname);
-#ifndef WIN32
+#ifndef _WIN32
(void)fchmod(fd, DEFFILEMODE);
#endif
} else {
@@ -62,7 +62,7 @@ asn1c_open_file(const char *name, const char *ext, char **opt_tmpname) {
return NULL;
}
-#ifndef WIN32
+#ifndef _WIN32
/*
* Check sanity.
*/
@@ -76,7 +76,7 @@ asn1c_open_file(const char *name, const char *ext, char **opt_tmpname) {
(void)ftruncate(fd, 0);
#else
_chsize(fd, 0);
-#endif /* WIN32 */
+#endif /* _WIN32 */
/*
* Convert file descriptor into file pointer.
diff --git a/libasn1compiler/asn1c_internal.h b/libasn1compiler/asn1c_internal.h
index fb8cc1e2..f97a40bc 100644
--- a/libasn1compiler/asn1c_internal.h
+++ b/libasn1compiler/asn1c_internal.h
@@ -22,7 +22,7 @@
#include <unistd.h> /* for unlink(2) */
#endif
-#ifdef WIN32
+#ifdef _WIN32
#include <io.h>
#include <malloc.h>
#include <fcntl.h>
diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c
index f348f197..2a01b411 100644
--- a/libasn1compiler/asn1c_save.c
+++ b/libasn1compiler/asn1c_save.c
@@ -356,7 +356,7 @@ identical_files(const char *fname1, const char *fname2) {
size_t olen, nlen;
int retval = 1; /* Files are identical */
-#ifndef WIN32
+#ifndef _WIN32
struct stat sb;
if(lstat(fname1, &sb) || !S_ISREG(sb.st_mode)
@@ -431,7 +431,7 @@ real_copy(const char *src, const char *dst) {
static int
asn1c_copy_over(arg_t *arg, char *path) {
char *fname;
-#ifdef WIN32
+#ifdef _WIN32
int use_real_copy = 1;
#else
int use_real_copy = (arg->flags & A1C_SKELETONS_COPY);