]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Alexander Dupuy: don't define our own [hn]to[nh][sl] macros if
authorguy <guy>
Wed, 27 Apr 2005 01:13:46 +0000 (01:13 +0000)
committerguy <guy>
Wed, 27 Apr 2005 01:13:46 +0000 (01:13 +0000)
__ntohl is defined; __ntohl is defined in some OSes as a special asm
function that does the same sort of fast byte swapping, and that gets in
the way of our so defining it.

tcpdump-stdinc.h

index d35161c4d960c7be544a6b026231399cb5e648eb..f2205d028ad019f6253ad88ae7a5350c8281f93c 100644 (file)
@@ -29,7 +29,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *
- * @(#) $Header: /tcpdump/master/tcpdump/tcpdump-stdinc.h,v 1.12.2.1 2005-04-20 09:46:45 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/tcpdump-stdinc.h,v 1.12.2.2 2005-04-27 01:13:46 guy Exp $ (LBL)
  */
 
 /*
@@ -129,7 +129,7 @@ typedef char* caddr_t;
   #define FOPEN_WRITE_BIN  FOPEN_WRITE_TXT
 #endif
 
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && !defined(__ntohl)
   #undef ntohl
   #undef ntohs
   #undef htonl