Ticket #70: paul-2.7.5.diff

File paul-2.7.5.diff, 2.4 KB (added by dmik, 11 years ago)
  • Python/thread_pthread.h

     
    207207    if (status != 0)
    208208        return -1;
    209209
     210#ifndef __OS2__
    210211    pthread_detach(th);
     212#endif
    211213
    212214#if SIZEOF_PTHREAD_T <= SIZEOF_LONG
    213215    return (long) th;
  • Python/thread.c

     
    3131
    3232#include "pythread.h"
    3333
     34#ifdef __OS2__
     35#define OS2_THREADS 1
     36#undef _POSIX_THREADS
     37#endif
     38
    3439#ifndef _POSIX_THREADS
    3540
    3641#ifdef __sgi
  • Python/random.c

     
    9595#endif /* MS_WINDOWS */
    9696
    9797
    98 #ifdef __VMS
     98#if defined(__VMS) || defined(__OS2__)
    9999/* Use openssl random routine */
    100100#include <openssl/rand.h>
    101101static int
     
    116116#endif /* __VMS */
    117117
    118118
    119 #if !defined(MS_WINDOWS) && !defined(__VMS)
     119#if !defined(MS_WINDOWS) && !defined(__VMS) && !defined(__OS2__)
    120120
    121121/* Read size bytes from /dev/urandom into buffer.
    122122   Call Py_FatalError() on error. */
     
    243243#ifdef MS_WINDOWS
    244244    return win32_urandom((unsigned char *)buffer, size, 1);
    245245#else
    246 # ifdef __VMS
     246#if defined(__VMS) || defined(__OS2__)
    247247    return vms_urandom((unsigned char *)buffer, size, 1);
    248248# else
    249249    return dev_urandom_python((char*)buffer, size);
     
    302302#ifdef MS_WINDOWS
    303303        (void)win32_urandom((unsigned char *)secret, secret_size, 0);
    304304#else /* #ifdef MS_WINDOWS */
    305 # ifdef __VMS
     305#if defined(__VMS) || defined(__OS2__)
    306306        vms_urandom((unsigned char *)secret, secret_size, 0);
    307307# else
    308308        dev_urandom_noraise((char*)secret, secret_size);
  • Lib/ctypes/__init__.py

     
    137137    if WINFUNCTYPE.__doc__:
    138138        WINFUNCTYPE.__doc__ = CFUNCTYPE.__doc__.replace("CFUNCTYPE", "WINFUNCTYPE")
    139139
    140 elif _os.name == "posix":
     140elif _os.name in ("posix", "os2"):
    141141    from _ctypes import dlopen as _dlopen
    142142
    143143from _ctypes import sizeof, byref, addressof, alignment, resize