diff options
author | Geoffrey Keating <geoffk@apple.com> | 2007-06-07 18:56:51 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2007-06-07 18:56:51 +0000 |
commit | e46b55d03847d5da02710dc7c53bed67edd007ad (patch) | |
tree | d9d864d915cd9c3d17707352d3bf0704f21f26ab /gcc/config/darwin-c.c | |
parent | abea993f795f6b843d0a9ea036a93cb5d6f90bc1 (diff) | |
download | gcc-e46b55d03847d5da02710dc7c53bed67edd007ad.zip gcc-e46b55d03847d5da02710dc7c53bed67edd007ad.tar.gz gcc-e46b55d03847d5da02710dc7c53bed67edd007ad.tar.bz2 |
Index: ChangeLog
2007-06-06 Geoffrey Keating <geoffk@apple.com>
Hui-May Chang <hm.chang@apple.com>
* doc/invoke.texi (Darwin Options): Update documentation for
-mmacosx-version-min.
* config.gcc (*-*-darwin*): Set extra_gcc_objs.
* config/darwin-driver.c: New file.
* config/darwin.h (GCC_DRIVER_HOST_INITIALIZATION): New.
* config/t-darwin (darwin-driver.o): New rule.
* config/darwin-c.c (version_as_macro): Ignore low digit.
Index: testsuite/ChangeLog
2007-06-06 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/darwin-minversion-3.c: New.
Co-Authored-By: Hui-May Chang <hm.chang@apple.com>
From-SVN: r125537
Diffstat (limited to 'gcc/config/darwin-c.c')
-rw-r--r-- | gcc/config/darwin-c.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index 0b3e820..04f5ada 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -567,8 +567,8 @@ find_subframework_header (cpp_reader *pfile, const char *header, cpp_dir **dirp) /* Return the value of darwin_macosx_version_min suitable for the __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro, - so '10.4.2' becomes 1042. - Print a warning if the version number is not known. */ + so '10.4.2' becomes 1040. The lowest digit is always zero. + Print a warning if the version number can't be understood. */ static const char * version_as_macro (void) { @@ -579,18 +579,9 @@ version_as_macro (void) if (! ISDIGIT (darwin_macosx_version_min[3])) goto fail; result[2] = darwin_macosx_version_min[3]; - if (darwin_macosx_version_min[4] != '\0') - { - if (darwin_macosx_version_min[4] != '.') - goto fail; - if (! ISDIGIT (darwin_macosx_version_min[5])) - goto fail; - if (darwin_macosx_version_min[6] != '\0') - goto fail; - result[3] = darwin_macosx_version_min[5]; - } - else - result[3] = '0'; + if (darwin_macosx_version_min[4] != '\0' + && darwin_macosx_version_min[4] != '.') + goto fail; return result; |