http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50678



Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|WAITING                     |NEW

                 CC|                            |gingold at adacore dot com



--- Comment #72 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-02-05 
17:48:16 UTC ---

> This patch works here in Darwin 12.2.1:

> 

>                 === acats Summary ===

> # of expected passes            2320

> # of unexpected failures        0

> 

>                 === gnat Summary ===

> 

> # of expected passes            1158

> # of expected failures          17

> # of unsupported tests          5



Great!



> Especially considering that, I may have gone OTT in caching the determined

> version and/or separating the version determination into a new function.



Not at all, it's not forbidden to be clever.



> I haven't checked the returned values of the sysctl(3) calls or the length of

> the buffer required; what's policy? and what could be done if there was an

> error?



We should probably check the return value of sysctl and immediately return 0 if

there is a problem (it would be up to the caller to decide what to do with 0).

Then I don't think that we need to check the length.



Minor points:



 1. This should be



static int

__darwin_major_version (void)



 2. I think that you can pass NULL to strtol instead of dot_p.



 3. Double space before star-slash at the end of comments.



 4. No () for functions in comments.



> As an aside, what's the recommended technique for rebuilding and reinstalling

> just the RTS? ('cd gcc; make gnatlib' leaves the build in a state where 'make

> install' doesn't work).



rm $(target)/libada/stamp-libada gcc/stamp-gnatlib*

make all-target-libada





CCing Tristan who knows more about Darwin than me...

Reply via email to