Ticket #59772: patch-python38-leopard-tiger.diff

File patch-python38-leopard-tiger.diff, 2.1 KB (added by kencu (Ken), 5 years ago)
  • Modules/clinic/posixmodule.c.h

    diff --git Modules/clinic/posixmodule.c.h Modules/clinic/posixmodule.c.h
    index c0d1d4d..7052678 100644
    exit: 
    49754975    return return_value;
    49764976}
    49774977
    4978 #if defined(__APPLE__)
     4978#if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050
    49794979
    49804980PyDoc_STRVAR(os__fcopyfile__doc__,
    49814981"_fcopyfile($module, infd, outfd, flags, /)\n"
  • Modules/posixmodule.c

    diff --git Modules/posixmodule.c Modules/posixmodule.c
    index b09204d..78b2909 100644
    corresponding Unix manual entries for more information on calls."); 
    109109#include <sys/sendfile.h>
    110110#endif
    111111
    112 #if defined(__APPLE__)
     112#if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050
    113113#include <copyfile.h>
    114114#endif
    115115
    done: 
    91539153#endif /* HAVE_SENDFILE */
    91549154
    91559155
    9156 #if defined(__APPLE__)
     9156#if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050
    91579157/*[clinic input]
    91589158os._fcopyfile
    91599159
    all_ins(PyObject *m) 
    1422214222#endif
    1422314223#endif
    1422414224
    14225 #if defined(__APPLE__)
     14225#if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1050
    1422614226    if (PyModule_AddIntConstant(m, "_COPYFILE_DATA", COPYFILE_DATA)) return -1;
    1422714227#endif
    1422814228
  • Python/thread_pthread.h

    diff --git Python/thread_pthread.h Python/thread_pthread.h
    index 5678b05..5cfdd17 100644
     
    1414
    1515#if defined(__linux__)
    1616#   include <sys/syscall.h>     /* syscall(SYS_gettid) */
     17#elif defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED < 1060
     18#   include <sys/syscall.h>     /* syscall(SYS_gettid) */
    1719#elif defined(__FreeBSD__)
    1820#   include <pthread_np.h>      /* pthread_getthreadid_np() */
    1921#elif defined(__OpenBSD__)
    PyThread_get_thread_native_id(void) 
    325327{
    326328    if (!initialized)
    327329        PyThread_init_thread();
    328 #ifdef __APPLE__
     330#if defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED >= 1060
    329331    uint64_t native_id;
    330332    (void) pthread_threadid_np(NULL, &native_id);
     333#elif defined(__APPLE__) && MACOSX_VERSION_MAX_ALLOWED < 1060
     334    pid_t native_id;
     335    native_id = syscall(SYS_gettid);
    331336#elif defined(__linux__)
    332337    pid_t native_id;
    333338    native_id = syscall(SYS_gettid);