View | Details | Return to bug 61407 | Differences between
and this patch

Collapse All | Expand All

(-)a/fixincludes/fixincl.x (-8 / +52 lines)
Lines 1-12 Link Here
1
/*  -*- buffer-read-only: t -*- vi: set ro:
1
/*  -*- buffer-read-only: t -*- vi: set ro:
2
 * 
2
 *
3
 * DO NOT EDIT THIS FILE   (fixincl.x)
3
 * DO NOT EDIT THIS FILE   (fixincl.x)
4
 * 
4
 *
5
 * It has been AutoGen-ed  Tuesday January  7, 2014 at 12:02:54 PM MET
5
 * It has been AutoGen-ed  June 17, 2014 at 02:45:21 AM by AutoGen 5.18.1
6
 * From the definitions    inclhack.def
6
 * From the definitions    inclhack.def
7
 * and the template file   fixincl
7
 * and the template file   fixincl
8
 */
8
 */
9
/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jan  7 12:02:54 MET 2014
9
/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jun 17 02:45:21 FET 2014
10
 *
10
 *
11
 * You must regenerate it.  Use the ./genfixes script.
11
 * You must regenerate it.  Use the ./genfixes script.
12
 *
12
 *
Lines 15-21 Link Here
15
 * certain ANSI-incompatible system header files which are fixed to work
15
 * certain ANSI-incompatible system header files which are fixed to work
16
 * correctly with ANSI C and placed in a directory that GNU C will search.
16
 * correctly with ANSI C and placed in a directory that GNU C will search.
17
 *
17
 *
18
 * This file contains 224 fixup descriptions.
18
 * This file contains 225 fixup descriptions.
19
 *
19
 *
20
 * See README for more information.
20
 * See README for more information.
21
 *
21
 *
Lines 9182-9187 static const char* apzX11_SprintfPatch[] = { Link Here
9182
#endif /* !defined __STDC__ */",
9182
#endif /* !defined __STDC__ */",
9183
    (char*)NULL };
9183
    (char*)NULL };
9184
9184
9185
/* * * * * * * * * * * * * * * * * * * * * * * * * *
9186
 *
9187
 *  Description of Darwin14_Has_Feature fix
9188
 */
9189
tSCC zDarwin14_Has_FeatureName[] =
9190
     "darwin14_has_feature";
9191
9192
/*
9193
 *  File name selection pattern
9194
 */
9195
tSCC zDarwin14_Has_FeatureList[] =
9196
  "Availability.h\0";
9197
/*
9198
 *  Machine/OS name selection pattern
9199
 */
9200
tSCC* apzDarwin14_Has_FeatureMachs[] = {
9201
        "*-*-darwin14.0*",
9202
        (const char*)NULL };
9203
#define DARWIN14_HAS_FEATURE_TEST_CT  0
9204
#define aDarwin14_Has_FeatureTests   (tTestDesc*)NULL
9205
9206
/*
9207
 *  Fix Command Arguments for Darwin14_Has_Feature
9208
 */
9209
static const char* apzDarwin14_Has_FeaturePatch[] = {
9210
    "wrap",
9211
    "\n\
9212
/* GCC doesn't support __has_feature built-in in C mode and\n\
9213
 * using defined(__has_feature) && __has_feature in the same\n\
9214
 * macro expression is not valid. So, easiest way is to define\n\
9215
 * for this header __has_feature as a macro, returning 0, in case\n\
9216
 * it is not defined internally\n\
9217
 */\n\
9218
#ifndef __has_feature\n\
9219
#define __has_feature(x) 0\n\
9220
#endif\n",
9221
    (char*)NULL };
9222
9185
9223
9186
/* * * * * * * * * * * * * * * * * * * * * * * * * *
9224
/* * * * * * * * * * * * * * * * * * * * * * * * * *
9187
 *
9225
 *
Lines 9189-9195 static const char* apzX11_SprintfPatch[] = { Link Here
9189
 */
9227
 */
9190
#define REGEX_COUNT          261
9228
#define REGEX_COUNT          261
9191
#define MACH_LIST_SIZE_LIMIT 187
9229
#define MACH_LIST_SIZE_LIMIT 187
9192
#define FIX_COUNT            224
9230
#define FIX_COUNT            225
9193
9231
9194
/*
9232
/*
9195
 *  Enumerate the fixes
9233
 *  Enumerate the fixes
Lines 9418-9424 typedef enum { Link Here
9418
    X11_CLASS_FIXIDX,
9456
    X11_CLASS_FIXIDX,
9419
    X11_CLASS_USAGE_FIXIDX,
9457
    X11_CLASS_USAGE_FIXIDX,
9420
    X11_NEW_FIXIDX,
9458
    X11_NEW_FIXIDX,
9421
    X11_SPRINTF_FIXIDX
9459
    X11_SPRINTF_FIXIDX,
9460
    DARWIN14_HAS_FEATURE_FIXIDX
9422
} t_fixinc_idx;
9461
} t_fixinc_idx;
9423
9462
9424
tFixDesc fixDescList[ FIX_COUNT ] = {
9463
tFixDesc fixDescList[ FIX_COUNT ] = {
Lines 10540-10544 tFixDesc fixDescList[ FIX_COUNT ] = { Link Here
10540
  {  zX11_SprintfName,    zX11_SprintfList,
10579
  {  zX11_SprintfName,    zX11_SprintfList,
10541
     apzX11_SprintfMachs,
10580
     apzX11_SprintfMachs,
10542
     X11_SPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
10581
     X11_SPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
10543
     aX11_SprintfTests,   apzX11_SprintfPatch, 0 }
10582
     aX11_SprintfTests,   apzX11_SprintfPatch, 0 },
10583
10584
  {  zDarwin14_Has_FeatureName,    zDarwin14_Has_FeatureList,
10585
     apzDarwin14_Has_FeatureMachs,
10586
     DARWIN14_HAS_FEATURE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
10587
     aDarwin14_Has_FeatureTests,   apzDarwin14_Has_FeaturePatch, 0 }
10544
};
10588
};
(-)a/fixincludes/inclhack.def (+29 lines)
Lines 4751-4754 fix = { Link Here
4751
4751
4752
    test_text = "extern char *\tsprintf();";
4752
    test_text = "extern char *\tsprintf();";
4753
};
4753
};
4754
4755
/*
4756
 * Fix stdio.h using C++ __has_feature built-in on OS X 10.10
4757
 */
4758
fix = {
4759
    hackname  = darwin14_has_feature;
4760
    files     = Availability.h;
4761
    mach      = "*-*-darwin14.0*";
4762
    
4763
    c_fix     = wrap;
4764
    c_fix_arg = <<- _HasFeature_
4765
4766
/*
4767
 * GCC doesn't support __has_feature built-in in C mode and
4768
 * using defined(__has_feature) && __has_feature in the same
4769
 * macro expression is not valid. So, easiest way is to define
4770
 * for this header __has_feature as a macro, returning 0, in case
4771
 * it is not defined internally
4772
 */
4773
#ifndef __has_feature
4774
#define __has_feature(x) 0
4775
#endif
4776
4777
4778
_HasFeature_;
4779
    
4780
    test_text = '';
4781
};
4782
4754
/*EOF*/
4783
/*EOF*/
(-)a/gcc/config/darwin-c.c (-6 / +17 lines)
Lines 572-591 find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp) Link Here
572
572
573
/* Return the value of darwin_macosx_version_min suitable for the
573
/* Return the value of darwin_macosx_version_min suitable for the
574
   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro,
574
   __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro,
575
   so '10.4.2' becomes 1040.  The lowest digit is always zero.
575
   so '10.4.2' becomes 1040 and '10.10.0' becomes 101000.  The lowest
576
   Print a warning if the version number can't be understood.  */
576
   digit is always zero. Print a warning if the version number
577
   can't be understood.  */
577
static const char *
578
static const char *
578
version_as_macro (void)
579
version_as_macro (void)
579
{
580
{
580
  static char result[] = "1000";
581
  static char result[7] = "1000";
582
  int minorDigitIdx;
581
583
582
  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
584
  if (strncmp (darwin_macosx_version_min, "10.", 3) != 0)
583
    goto fail;
585
    goto fail;
584
  if (! ISDIGIT (darwin_macosx_version_min[3]))
586
  if (! ISDIGIT (darwin_macosx_version_min[3]))
585
    goto fail;
587
    goto fail;
586
  result[2] = darwin_macosx_version_min[3];
588
587
  if (darwin_macosx_version_min[4] != '\0'
589
  minorDigitIdx = 3;
588
      && darwin_macosx_version_min[4] != '.')
590
  result[2] = darwin_macosx_version_min[minorDigitIdx++];
591
  if (ISDIGIT(darwin_macosx_version_min[minorDigitIdx])) {
592
    /* Starting with 10.10 numeration for mactro changed */
593
    result[3] = darwin_macosx_version_min[minorDigitIdx++];
594
    result[4] = '0';
595
    result[5] = '0';
596
    result[6] = '\0';
597
  }
598
  if (darwin_macosx_version_min[minorDigitIdx] != '\0'
599
      && darwin_macosx_version_min[minorDigitIdx] != '.')
589
    goto fail;
600
    goto fail;
590
601
591
  return result;
602
  return result;
(-)a/gcc/config/darwin-driver.c (-1 / +1 lines)
Lines 57-63 darwin_find_version_from_kernel (char *new_flag) Link Here
57
  version_p = osversion + 1;
57
  version_p = osversion + 1;
58
  if (ISDIGIT (*version_p))
58
  if (ISDIGIT (*version_p))
59
    major_vers = major_vers * 10 + (*version_p++ - '0');
59
    major_vers = major_vers * 10 + (*version_p++ - '0');
60
  if (major_vers > 4 + 9)
60
  if (major_vers > 4 + 10)
61
    goto parse_failed;
61
    goto parse_failed;
62
  if (*version_p++ != '.')
62
  if (*version_p++ != '.')
63
    goto parse_failed;
63
    goto parse_failed;
(-)a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc (-1 / +3 lines)
Lines 940-947 CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); Link Here
940
940
941
COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent));
941
COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent));
942
CHECK_SIZE_AND_OFFSET(dirent, d_ino);
942
CHECK_SIZE_AND_OFFSET(dirent, d_ino);
943
#if SANITIZER_MAC
943
#if SANITIZER_MAC && ( !defined(__DARWIN_64_BIT_INO_T) || __DARWIN_64_BIT_INO_T)
944
CHECK_SIZE_AND_OFFSET(dirent, d_seekoff);
944
CHECK_SIZE_AND_OFFSET(dirent, d_seekoff);
945
#elif SANITIZER_MAC
946
// There is no d_seekoff with non 64-bit ino_t
945
#elif SANITIZER_FREEBSD
947
#elif SANITIZER_FREEBSD
946
// There is no 'd_off' field on FreeBSD.
948
// There is no 'd_off' field on FreeBSD.
947
#else
949
#else
(-)a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h (+8 lines)
Lines 392-403 namespace __sanitizer { Link Here
392
#endif
392
#endif
393
393
394
#if SANITIZER_MAC
394
#if SANITIZER_MAC
395
# if ! defined(__DARWIN_64_BIT_INO_T) || __DARWIN_64_BIT_INO_T
395
  struct __sanitizer_dirent {
396
  struct __sanitizer_dirent {
396
    unsigned long long d_ino;
397
    unsigned long long d_ino;
397
    unsigned long long d_seekoff;
398
    unsigned long long d_seekoff;
398
    unsigned short d_reclen;
399
    unsigned short d_reclen;
399
    // more fields that we don't care about
400
    // more fields that we don't care about
400
  };
401
  };
402
# else
403
  struct __sanitizer_dirent {
404
    unsigned int d_ino;
405
    unsigned short d_reclen;
406
    // more fields that we don't care about
407
  };
408
# endif
401
#elif SANITIZER_FREEBSD
409
#elif SANITIZER_FREEBSD
402
  struct __sanitizer_dirent {
410
  struct __sanitizer_dirent {
403
    unsigned int d_fileno;
411
    unsigned int d_fileno;

Return to bug 61407