only define WIN32 if it is not already defined
diff --git a/src/crypto/x509.c b/src/crypto/x509.c
index b957f2d..90a213b 100644
--- a/src/crypto/x509.c
+++ b/src/crypto/x509.c
@@ -440,14 +440,14 @@
 	    Py_INCREF(Py_None);
 	    return Py_None;
 	} else if (timestamp->type == V_ASN1_GENERALIZEDTIME) {
-	    return PyString_FromString((char *)timestamp->data);
+		return PyString_FromString((char *)timestamp->data);
 	} else {
 		ASN1_TIME_to_generalizedtime(timestamp, &gt_timestamp);
 		if (gt_timestamp == NULL) {
 			exception_from_error_queue();
 			return NULL;
 		} else {
-		    py_timestamp = PyString_FromString((char *)gt_timestamp->data);
+			py_timestamp = PyString_FromString((char *)gt_timestamp->data);
 			ASN1_GENERALIZEDTIME_free(gt_timestamp);
 			return py_timestamp;
 		}
diff --git a/src/rand/rand.c b/src/rand/rand.c
index 9802a92..ff89ebb 100644
--- a/src/rand/rand.c
+++ b/src/rand/rand.c
@@ -15,8 +15,10 @@
  * WIN32 or WINDOWS needs to be defined, otherwise we get a
  * warning.
  */
-#ifdef MS_WINDOWS 
-#define WIN32
+#ifdef MS_WINDOWS
+#  ifndef WIN32
+#      define WIN32
+#  endif
 #endif
 #include <openssl/rand.h>