Re: Avoid using common symbols in v850 libgloss

Jeff Law <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>

On 3/19/2022 7:20 PM, Mike Frysinger wrote:
> On 09 Feb 2022 18:58, Jeff Law wrote:
>> I've had this lying around for probably a year or two at this point.
>> It just changes all the instance of "errno" from a common symbol to an
>> extern.  I can't offhand recall where the actual definition is, but it
>> certainly exists in the generic code.
>>
>> --- a/libgloss/v850/_exit.c
>> +++ b/libgloss/v850/_exit.c
>> @@ -3,7 +3,7 @@
>>   #include <sys/stat.h>
>>   #include "sys/syscall.h"
>>   
>> -int errno;
>> +extern int errno;
> why not just include errno.h ?  using `extern int errno;` is so pre-2000 :p.
:-0  I think i wrote it in the late 90s, so you're spot on.

In reality it didn't even cross my mind.   No objections if it gets 
changed, though ideally I'll never hack v850 newlib again :-)

jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.