Ticket #56502: headers-10.13-fix.patch

File headers-10.13-fix.patch, 4.0 KB (added by kencu (Ken), 6 years ago)

patch for gcc5

  • fixincludes/fixincl.x

    diff -pur fixincludes/fixincl.x gcc-5.5.0/fixincludes/fixincl.x
     
    11/*  -*- buffer-read-only: t -*- vi: set ro:
    2  * 
     2 *
    33 * DO NOT EDIT THIS FILE   (fixincl.x)
    4  * 
    5  * It has been AutoGen-ed  January  5, 2017 at 06:05:06 PM by AutoGen 5.16.2
     4 *
     5 * It has been AutoGen-ed  December 21, 2017 at 02:34:35 PM by AutoGen 5.18.7
    66 * From the definitions    inclhack.def
    77 * and the template file   fixincl
    88 */
    9 /* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jan  5 18:05:06 CET 2017
     9/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Dec 21 14:34:35 CET 2017
    1010 *
    1111 * You must regenerate it.  Use the ./genfixes script.
    1212 *
     
    1515 * certain ANSI-incompatible system header files which are fixed to work
    1616 * correctly with ANSI C and placed in a directory that GNU C will search.
    1717 *
    18  * This file contains 240 fixup descriptions.
     18 * This file contains 241 fixup descriptions.
    1919 *
    2020 * See README for more information.
    2121 *
    extern \"C\" {\n\ 
    25792579
    25802580/* * * * * * * * * * * * * * * * * * * * * * * * * *
    25812581 *
     2582 *  Description of Darwin_Osavailability fix
     2583 */
     2584tSCC zDarwin_OsavailabilityName[] =
     2585     "darwin_osavailability";
     2586
     2587/*
     2588 *  File name selection pattern
     2589 */
     2590tSCC zDarwin_OsavailabilityList[] =
     2591  "os/availability.h\0";
     2592/*
     2593 *  Machine/OS name selection pattern
     2594 */
     2595tSCC* apzDarwin_OsavailabilityMachs[] = {
     2596        "*-*-darwin*",
     2597        (const char*)NULL };
     2598
     2599/*
     2600 *  content selection pattern - do fix if pattern found
     2601 */
     2602tSCC zDarwin_OsavailabilitySelect0[] =
     2603       "#define[ \t]+__(API_[A-Z_]*)\\(\\.\\.\\.\\)";
     2604
     2605#define    DARWIN_OSAVAILABILITY_TEST_CT  1
     2606static tTestDesc aDarwin_OsavailabilityTests[] = {
     2607  { TT_EGREP,    zDarwin_OsavailabilitySelect0, (regex_t*)NULL }, };
     2608
     2609/*
     2610 *  Fix Command Arguments for Darwin_Osavailability
     2611 */
     2612static const char* apzDarwin_OsavailabilityPatch[] = {
     2613    "format",
     2614    "#define %1(...)",
     2615    (char*)NULL };
     2616
     2617/* * * * * * * * * * * * * * * * * * * * * * * * * *
     2618 *
    25822619 *  Description of Darwin_9_Long_Double_Funcs_2 fix
    25832620 */
    25842621tSCC zDarwin_9_Long_Double_Funcs_2Name[] =
    static const char* apzX11_SprintfPatch[] 
    98189855 *
    98199856 *  List of all fixes
    98209857 */
    9821 #define REGEX_COUNT          276
     9858#define REGEX_COUNT          277
    98229859#define MACH_LIST_SIZE_LIMIT 187
    9823 #define FIX_COUNT            240
     9860#define FIX_COUNT            241
    98249861
    98259862/*
    98269863 *  Enumerate the fixes
    typedef enum { 
    98859922    CTRL_QUOTES_DEF_FIXIDX,
    98869923    CTRL_QUOTES_USE_FIXIDX,
    98879924    CXX_UNREADY_FIXIDX,
     9925    DARWIN_OSAVAILABILITY_FIXIDX,
    98889926    DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
    98899927    DARWIN_EXTERNC_FIXIDX,
    98909928    DARWIN_GCC4_BREAKAGE_FIXIDX,
    tFixDesc fixDescList[ FIX_COUNT ] = { 
    1036410402     CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
    1036510403     aCxx_UnreadyTests,   apzCxx_UnreadyPatch, 0 },
    1036610404
     10405  {  zDarwin_OsavailabilityName,    zDarwin_OsavailabilityList,
     10406     apzDarwin_OsavailabilityMachs,
     10407     DARWIN_OSAVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
     10408     aDarwin_OsavailabilityTests,   apzDarwin_OsavailabilityPatch, 0 },
     10409
    1036710410  {  zDarwin_9_Long_Double_Funcs_2Name,    zDarwin_9_Long_Double_Funcs_2List,
    1036810411     apzDarwin_9_Long_Double_Funcs_2Machs,
    1036910412     DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
  • fixincludes/inclhack.def

    diff -pur fixincludes/inclhack.def gcc-5.5.0/fixincludes/inclhack.def
    fix = { 
    13371337    test_text = "extern void* malloc( size_t );";
    13381338};
    13391339
     1340fix = {
     1341    hackname  = darwin_osavailability;
     1342    mach      = "*-*-darwin*";
     1343    files     = os/availability.h;
     1344    select    = "#define[ \t]+__(API_[A-Z_]*)\\(\\.\\.\\.\\)";
     1345    c_fix     = format;
     1346    c_fix_arg = "#define %1(...)";
     1347
     1348    test_text = "#define __API_AVAILABLE(...)\n"
     1349                "#define API_AVAILABLE(...)\n";
     1350};
     1351
    13401352/*
    13411353 *  For the AAB_darwin7_9_long_double_funcs fix to be useful,
    13421354 *  you have to not use "" includes.