Author: Matti Picus <[email protected]>
Branch: msvc14
Changeset: r93779:80c21230ed5e
Date: 2018-02-06 17:27 -0500
http://bitbucket.org/pypy/pypy/changeset/80c21230ed5e/

Log:    cleanup for non-msvc14

diff --git a/pypy/module/time/interp_time.py b/pypy/module/time/interp_time.py
--- a/pypy/module/time/interp_time.py
+++ b/pypy/module/time/interp_time.py
@@ -192,15 +192,22 @@
                              "RPY_EXTERN "
                              "void pypy__tzset();"],
         separate_module_sources = ["""
-        long pypy_get_timezone() { long timezone; _get_timezone(&timezone); 
return timezone;};
-        int pypy_get_daylight() { int daylight; _get_daylight(&daylight); 
return daylight;};
-        int pypy_get_tzname(size_t len, int index, char * tzname) {
-             size_t s;
-             return 0;
-             errno_t ret = _get_tzname(&s, tzname, len, index);
-             return (int)s;
-        };
-        void pypy__tzset() { _tzset(); }
+            long pypy_get_timezone() {
+                long timezone; 
+                _get_timezone(&timezone); 
+                return timezone;
+            };
+            int pypy_get_daylight() {
+                int daylight;
+                _get_daylight(&daylight);
+                return daylight;
+            };
+            int pypy_get_tzname(size_t len, int index, char * tzname) {
+                size_t s;
+                errno_t ret = _get_tzname(&s, tzname, len, index);
+                return (int)s;
+            };
+            void pypy__tzset() { _tzset(); }
         """])
     # Ensure sure that we use _tzset() and timezone from the same C Runtime.
     c_tzset = external('pypy__tzset', [], lltype.Void, win_eci)
diff --git a/rpython/rlib/rposix.py b/rpython/rlib/rposix.py
--- a/rpython/rlib/rposix.py
+++ b/rpython/rlib/rposix.py
@@ -44,7 +44,7 @@
         includes=['errno.h','stdio.h', 'stdint.h']
     separate_module_sources =['''
         /* Lifted completely from CPython 3 Modules/posixmodule.c */
-        #if defined _MSC_VER && MSC_VER >= 1400 && _MSC_VER < 1900
+        #if defined _MSC_VER && _MSC_VER >= 1400 && _MSC_VER < 1900
         #include <malloc.h> /* for _msize */
         typedef struct {
             intptr_t osfhnd;
@@ -96,8 +96,8 @@
             errno = EBADF;
             return 0;
         }
-        RPY_EXTERN void* enter_suppress_iph(void) {return (void*)NULL};
-        RPY_EXTERN void exit_suppress_iph(void*) {};
+        RPY_EXTERN void* enter_suppress_iph(void) {return (void*)NULL;};
+        RPY_EXTERN void exit_suppress_iph(void* handle) {};
         #elif defined _MSC_VER
         RPY_EXTERN int _PyVerify_fd(int fd)
         {
@@ -133,8 +133,8 @@
         {
             return 1;
         }
-        void* enter_suppress_iph(void) {return (void*) NULL};
-        void exit_suppress_iph(void*) {};
+        RPY_EXTERN void* enter_suppress_iph(void) {return (void*)NULL;};
+        RPY_EXTERN void exit_suppress_iph(void* handle) {};
         #endif
     ''',]
     post_include_bits=['RPY_EXTERN int _PyVerify_fd(int);']
@@ -1148,7 +1148,6 @@
 
 @replace_os_function('isatty')
 def isatty(fd):
-    print 'isatty'
     with FdValidator(fd):
         return c_isatty(fd) != 0
     return False
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to