Dmitry V. Levin on 29 Mar 2006 20:26:59 -0000 |
Hi, On Wed, Mar 29, 2006 at 12:48:37AM -0500, Michael C. Toren wrote: > tcptraceroute-1.5beta7 is now available I have few patches made long time ago for beta5 and later rediffed for beta6. The most obvious one is attached. -- ldv diff -upk.orig tcptraceroute-1.5beta7.orig/main.c tcptraceroute-1.5beta7/main.c --- tcptraceroute-1.5beta7.orig/main.c 2006-03-29 02:30:35 +0000 +++ tcptraceroute-1.5beta7/main.c 2006-03-29 16:11:38 +0000 @@ -74,7 +74,7 @@ void defaults(void) } if (device == NULL) - fatal("Could not determine device via pcap_lookupdev(): %\n", errbuf); + fatal("Could not determine device via pcap_lookupdev(): %s\n", errbuf); if ((pcap = pcap_open_live(device, 0, 0, 0, errbuf)) == NULL) fatal("error opening device %s: %s\n", device, errbuf); diff -upk.orig tcptraceroute-1.5beta7.orig/util.h tcptraceroute-1.5beta7/util.h --- tcptraceroute-1.5beta7.orig/util.h 2006-03-29 02:30:59 +0000 +++ tcptraceroute-1.5beta7/util.h 2006-03-29 16:10:26 +0000 @@ -20,6 +20,21 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) +# define TCPTRACEROUTE_GNUC_PREREQ(maj, min) \ + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) +#else +# define TCPTRACEROUTE_GNUC_PREREQ(maj, min) 0 +#endif + +#if TCPTRACEROUTE_GNUC_PREREQ(2,5) +# define TCPTRACEROUTE_FORMAT(params) __attribute__((__format__ params)) +# define TCPTRACEROUTE_NORETURN __attribute__((__noreturn__)) +#else +# define TCPTRACEROUTE_FORMAT(params) +# define TCPTRACEROUTE_NORETURN +#endif + #define IPTOSBUFFERS 12 #define IPTOSBUFSIZ (4*3+3+1) /* Four three-digit numbers, three dots, and NUL */ @@ -37,15 +52,15 @@ libnet_name2addr4(libnet_context, (u_char *)hostname, numeric) #endif -void fatal(char *, ...); -void debug(char *, ...); -void warn(char *, ...); -void pfatal(char *); -void usage(void); -void about(void); +void fatal(char *, ...) TCPTRACEROUTE_NORETURN TCPTRACEROUTE_FORMAT((__printf__, 1, 2)); +void debug(char *, ...) TCPTRACEROUTE_FORMAT((__printf__, 1, 2)); +void warn(char *, ...) TCPTRACEROUTE_FORMAT((__printf__, 1, 2)); +void pfatal(char *) TCPTRACEROUTE_NORETURN; +void usage(void) TCPTRACEROUTE_NORETURN; +void about(void) TCPTRACEROUTE_NORETURN; void *xrealloc(void *, int); char *safe_strncpy(char *, char *, int); -int safe_snprintf(char *, int, char *, ...); +int safe_snprintf(char *, int, char *, ...) TCPTRACEROUTE_FORMAT((__printf__, 3, 4)); char *sprintable(char *); int isnumeric(char *); struct timeval tvdiff(struct timeval *, struct timeval *); Attachment:
pgpiZRUUakWum.pgp _______________________________________________ tcptraceroute-dev mailing list tcptraceroute-dev@netisland.net http://lists.netisland.net/mailman/listinfo/tcptraceroute-dev
|
|