From e46b55d03847d5da02710dc7c53bed67edd007ad Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Thu, 7 Jun 2007 18:56:51 +0000 Subject: Index: ChangeLog 2007-06-06 Geoffrey Keating Hui-May Chang * 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 * gcc.dg/darwin-minversion-3.c: New. Co-Authored-By: Hui-May Chang From-SVN: r125537 --- gcc/config/darwin-c.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'gcc/config/darwin-c.c') 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; -- cgit v1.1