Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-04-04 19:49:05 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-04-04 19:49:05 +0400
commit4fedce119c521a4bdb816457f76bf4c90244aeb6 (patch)
tree1848db550ea09c70a657cabe1dd190d13d78e58a /winsup/cygwin/include/asm
parent56c5c08a5dc6c3846f4e799ba3c9c32fa69c64e3 (diff)
* include/asm/byteorder.h (__ntohl): Prototype before define to avoid
a warning with -Wmissing-prototypes. Use _ELIDABLE_INLINE macro from _ansi.h. (__ntohs): Ditto.
Diffstat (limited to 'winsup/cygwin/include/asm')
-rw-r--r--winsup/cygwin/include/asm/byteorder.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/winsup/cygwin/include/asm/byteorder.h b/winsup/cygwin/include/asm/byteorder.h
index 8e9fbaa11..3727c5421 100644
--- a/winsup/cygwin/include/asm/byteorder.h
+++ b/winsup/cygwin/include/asm/byteorder.h
@@ -11,6 +11,7 @@ details. */
#ifndef _I386_BYTEORDER_H
#define _I386_BYTEORDER_H
+#include <_ansi.h>
#include <stdint.h>
#ifdef __cplusplus
@@ -30,10 +31,10 @@ extern uint16_t ntohs(uint16_t);
extern uint32_t htonl(uint32_t);
extern uint16_t htons(uint16_t);
-#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
-extern
-#endif
-__inline__ uint32_t
+_ELIDABLE_INLINE uint32_t __ntohl(uint32_t);
+_ELIDABLE_INLINE uint16_t __ntohs(uint16_t);
+
+_ELIDABLE_INLINE uint32_t
__ntohl(uint32_t x)
{
__asm__("xchgb %b0,%h0\n\t" /* swap lower bytes */
@@ -50,10 +51,7 @@ __ntohl(uint32_t x)
(((uint32_t)(x) & 0x00ff0000U) >> 8) | \
(((uint32_t)(x) & 0xff000000U) >> 24)))
-#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
-extern
-#endif
-__inline__ uint16_t
+_ELIDABLE_INLINE uint16_t
__ntohs(uint16_t x)
{
__asm__("xchgb %b0,%h0" /* swap bytes */