[prev in list] [next in list] [prev in thread] [next in thread]
List: ntop-dev
Subject: [Ntop-dev] atoll compile problem in address.c
From: "Burton M. Strauss III" <BStrauss3 () attbi ! com>
Date: 2002-02-19 23:57:36
Message-ID: HBEBKGPKAEJLGMLAANAOAEOBDKAA.BStrauss3 () attbi ! com
[Download RAW message or body]
The address.c routine has an atoll call.
This is
1) not present on some systems - notable FreeBSD4.x -
and
2) per the library writeup obsolete, despite being new in C99...
Anyway, rather than a long list of complex ifdefs, and a major pita finding
out which versions do and don't have it, this patch:
--- ntop-current-starting/address.c Thu Feb 14 06:54:42 2002
+++ ntop-current/address.c Tue Feb 19 17:50:09 2002
@@ -439,9 +439,5 @@
myGlobals.addressQueueLen--;
-#ifndef WIN32
- addr.s_addr = (unsigned long)atoll(data_data.dptr);
-#else
- addr.s_addr = (unsigned long)atol(data_data.dptr);
-#endif
+ addr.s_addr = (unsigned long)strtoll(data_data.dptr, NULL, 10);
#ifdef DNS_DEBUG
Robert Myles was kind enough to test this for me on FreeBSD4.4-Release, and
it's running ok on my Linux (RedHat 7.2) box...
-----Burton
(ref: BMS0039)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic