diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 12:41:01 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-10-29 12:41:01 +0100 |
commit | 6db566c308dd9ecf9e82938d7bec32884a596e74 (patch) | |
tree | 3beb37af116d2dcf9f705e6d213741c7822895b3 /gcc/ada/s-oscons-tmplt.c | |
parent | 43254605cb483d1f7fd5f8df8390d29e4442ba4e (diff) | |
download | gcc-6db566c308dd9ecf9e82938d7bec32884a596e74.zip gcc-6db566c308dd9ecf9e82938d7bec32884a596e74.tar.gz gcc-6db566c308dd9ecf9e82938d7bec32884a596e74.tar.bz2 |
[multiple changes]
2012-10-29 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document that pragma Optimize_Alignment (Space) is
ignored with a warning for packed variable length records.
2012-10-29 Thomas Quinot <quinot@adacore.com>
* socket.c, g-socthi-dummy.adb, g-socthi-dummy.ads, g-socthi-vms.adb,
g-socthi-vms.ads, g-socthi-vxworks.adb, g-socthi-vxworks.ads,
s-oscons-tmplt.c, g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
g-socthi.ads, xoscons.adb, g-socket.adb, g-sothco.ads: Introduce an
appropriate subtype for IOCTL requests, since these may be signed or
unsigned.
From-SVN: r192939
Diffstat (limited to 'gcc/ada/s-oscons-tmplt.c')
-rw-r--r-- | gcc/ada/s-oscons-tmplt.c | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/gcc/ada/s-oscons-tmplt.c b/gcc/ada/s-oscons-tmplt.c index 25299e8..c386a1f 100644 --- a/gcc/ada/s-oscons-tmplt.c +++ b/gcc/ada/s-oscons-tmplt.c @@ -182,6 +182,9 @@ int counter = 0; #define C(sname,type,value,comment)\ printf ("\n->C:$%d:" sname ":" #type ":" value ":" comment, __LINE__); +#define SUB(sname)\ + printf ("\n->SUB:$%d:" #sname ":" sname, __LINE__); + #define TXT(text) \ printf ("\n->TXT:$%d:" text, __LINE__); @@ -209,6 +212,11 @@ int counter = 0; : : "i" (__LINE__)); /* Typed constant */ +#define SUB(sname) \ + asm volatile("\n->SUB:%0:" #sname ":" sname \ + : : "i" (__LINE__)); +/* Subtype */ + #define TXT(text) \ asm volatile("\n->TXT:%0:" text \ : : "i" (__LINE__)); @@ -217,14 +225,7 @@ int counter = 0; #endif /* NATIVE */ #define CST(name,comment) C(#name,String,name,comment) - -/* ioctl(2) requests are "int" in UNIX, but "unsigned long" on FreeBSD */ - -#ifdef __FreeBSD__ -# define CNI CNU -#else -# define CNI CND -#endif +/* String constant */ #define STR(x) STR1(x) #define STR1(x) #x @@ -378,6 +379,18 @@ CND(FNDELAY, "Nonblocking") */ +/* ioctl(2) requests are "int" in UNIX, but "unsigned long" on FreeBSD */ + +#ifdef __FreeBSD__ +# define CNI CNU +# define IOCTL_Req_T "unsigned" +#else +# define CNI CND +# define IOCTL_Req_T "int" +#endif + +SUB(IOCTL_Req_T) + #ifndef FIONBIO # define FIONBIO -1 #endif @@ -1333,12 +1346,12 @@ CND(SIZEOF_sigset, "sigset"); */ #if defined (__sun__) || defined (__hpux__) -# define msg_iovlen_t "int" +# define Msg_Iovlen_T "int" #else -# define msg_iovlen_t "size_t" +# define Msg_Iovlen_T "size_t" #endif -TXT(" subtype Msg_Iovlen_T is Interfaces.C." msg_iovlen_t ";") +SUB(Msg_Iovlen_T) /* |