Re: Avoid using common symbols in v850 libgloss

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <YjaBTtkfURhTh5Ts@vapier>
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.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmI2gU4ACgkQQWM7n+g3
9YFXpBAAy6DE9LQTiKtujwVn28LjuEL/i43T61Hs9J345+Q3FPCv7i7dI0pN2Qpk
q9O4mrOaEnyfvu0FGm3KxOoKOIAKfoZFLvtuqYwney+mccONjfSasNKsDR+po6GN
Nzf8b3XxKHAcVsbzUXG1oVmyz0EJOU5Vr31VwHUVpEXkhyKp7YcT++o0Qo5NP9ap
nkw/66vFGwu8WG+mn1+mFUAfIwqcDYvUO5HH0eAHtoMfJqUwol1qbksoX8ldWuaI
wV5Sa0UsqPg2Tgqtsld1l3k/qu/XZu0MO33n0gxB8RB32DMoXf3iZkSgFOqUJq5h
aRUTwpkIjBjuaC5oFp+8UQE6Thg3yq9dtLgNx2MwyyUAbtBDHdsYG1t4dAzZSCiS
V3NUCa86PhSpUOYYAG8H0UkvxDmeK2BWZ40rHg95PGYA7OQW0J4bYa73T9BBMH4P
9UaLpb/zhuOzMpcsl6/SvbSwnd6OwrRq3ghjv1TBZBHu6luPk24L/k17MxMYDGih
zwgJyDzk3ksJQ10m1VzdzteV0k9RRQQho21t6LGCKJc2JIQrDRTQYMNG0IMT/5lH
9+te4AS3pi/hYt4U24Kdj5IojzR8157Mdz2AfK+NG5ikHbRzkkeZM8SHfr6OGfKF
Uf+vYhSVS5aYCk7Lto8yr3xvDTFl4h6HM33qjUGBIMlmSSAKMbU=
=BE/+
-----END PGP SIGNATURE-----
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.