Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/tcpdump use static __inline__ as per latest upstream, f...



details:   https://anonhg.NetBSD.org/src/rev/83d2c4341bb5
branches:  trunk
changeset: 753790:83d2c4341bb5
user:      plunky <plunky%NetBSD.org@localhost>
date:      Sat Apr 10 08:33:35 2010 +0000

description:
use static __inline__ as per latest upstream, fixes problem with
C99 vs GNUC semantics of extern __inline__

diffstat:

 dist/tcpdump/tcpdump-stdinc.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r fd11fee559a3 -r 83d2c4341bb5 dist/tcpdump/tcpdump-stdinc.h
--- a/dist/tcpdump/tcpdump-stdinc.h     Sat Apr 10 08:29:53 2010 +0000
+++ b/dist/tcpdump/tcpdump-stdinc.h     Sat Apr 10 08:33:35 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcpdump-stdinc.h,v 1.2 2007/07/24 11:53:50 drochner Exp $      */
+/*     $NetBSD: tcpdump-stdinc.h,v 1.3 2010/04/10 08:33:35 plunky Exp $        */
 
 /*
  * Copyright (c) 2002 - 2003
@@ -151,15 +151,15 @@
   #undef htonl
   #undef htons
 
-  extern __inline__ unsigned long __ntohl (unsigned long x);
-  extern __inline__ unsigned short __ntohs (unsigned short x);
+  static __inline__ unsigned long __ntohl (unsigned long x);
+  static __inline__ unsigned short __ntohs (unsigned short x);
 
   #define ntohl(x)  __ntohl(x)
   #define ntohs(x)  __ntohs(x)
   #define htonl(x)  __ntohl(x)
   #define htons(x)  __ntohs(x)
 
-  extern __inline__ unsigned long __ntohl (unsigned long x)
+  static __inline__ unsigned long __ntohl (unsigned long x)
   {
     __asm__ ("xchgb %b0, %h0\n\t"   /* swap lower bytes  */
              "rorl  $16, %0\n\t"    /* swap words        */
@@ -168,7 +168,7 @@
     return (x);
   }
 
-  extern __inline__ unsigned short __ntohs (unsigned short x)
+  static __inline__ unsigned short __ntohs (unsigned short x)
   {
     __asm__ ("xchgb %b0, %h0"       /* swap bytes */
             : "=q" (x) : "0" (x));



Home | Main Index | Thread Index | Old Index