summaryrefslogtreecommitdiff
path: root/src/Update.cpp
diff options
context:
space:
mode:
authorntoskrnl <ntoskrnl11@yahoo.com>2012-07-29 16:14:14 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-02 14:21:16 (GMT)
commitf94fabd999c304de958cc051e9625f169cec138f (patch)
tree9ee58bc33bd745afa32b0d57b413cc7a555cd545 /src/Update.cpp
parent87dfc47c9785f834e61eef4545c503071d1665fc (diff)
downloadpowder-f94fabd999c304de958cc051e9625f169cec138f.zip
powder-f94fabd999c304de958cc051e9625f169cec138f.tar.gz
Rename WIN32 preprocessor definition to WIN
Diffstat (limited to 'src/Update.cpp')
-rw-r--r--src/Update.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Update.cpp b/src/Update.cpp
index d73eb7e..853043d 100644
--- a/src/Update.cpp
+++ b/src/Update.cpp
@@ -1,6 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
-#ifndef WIN32
+#ifndef WIN
#include <sys/param.h>
#endif
#if !defined(MACOSX) && !defined(BSD)
@@ -8,7 +8,7 @@
#endif
#include <string.h>
-#ifdef WIN32
+#ifdef WIN
#include <windows.h>
#else
#include <unistd.h>
@@ -24,7 +24,7 @@
/*char *exe_name(void)
{
-#if defined WIN32
+#if defined(WIN)
char *name= (char *)malloc(64);
DWORD max=64, res;
while ((res = GetModuleFileName(NULL, name, max)) >= max)
@@ -69,7 +69,7 @@
int update_start(char *data, int len)
{
char *self=exe_name(), *temp;
-#ifdef WIN32
+#ifdef WIN
char *p;
#endif
FILE *f;
@@ -78,7 +78,7 @@ int update_start(char *data, int len)
if (!self)
return 1;
-#ifdef WIN32
+#ifdef WIN
temp = (char*)malloc(strlen(self)+12);
strcpy(temp, self);
p = temp + strlen(temp) - 4;
@@ -146,7 +146,7 @@ fail:
int update_finish(void)
{
-#ifdef WIN32
+#ifdef WIN
char *temp, *self=exe_name(), *p;
int timeout = 60, err;
@@ -181,7 +181,7 @@ int update_finish(void)
void update_cleanup(void)
{
-#ifdef WIN32
+#ifdef WIN
update_finish();
#endif
}