Skip to content

Commit bbc1cfa

Browse files
committed
Have the configure script arrange that the Makefile define _U_
appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
1 parent 7d83ad1 commit bbc1cfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+454
-509
lines changed

Diff for: Makefile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1818
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1919
#
20-
# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.276 2003-10-27 10:13:45 hannes Exp $ (LBL)
20+
# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.277 2003-11-16 09:36:07 guy Exp $ (LBL)
2121

2222
#
2323
# Various configurable paths (remember to edit Makefile.in, not Makefile)
@@ -43,7 +43,7 @@ CC = @CC@
4343
PROG = tcpdump
4444
CCOPT = @V_CCOPT@
4545
INCLS = -I. @V_INCLS@
46-
DEFS = @DEFS@
46+
DEFS = @DEFS@ @V_DEFS@
4747

4848
# Standard CFLAGS
4949
CFLAGS = $(CCOPT) $(DEFS) $(INCLS)

Diff for: aclocal.m4

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.98 2003-11-04 07:29:15 guy Exp $ (LBL)
1+
dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.99 2003-11-16 09:36:08 guy Exp $ (LBL)
22
dnl
33
dnl Copyright (c) 1995, 1996, 1997, 1998
44
dnl The Regents of the University of California. All rights reserved.
@@ -1193,6 +1193,9 @@ ac_cv___attribute__=yes,
11931193
ac_cv___attribute__=no)])
11941194
if test "$ac_cv___attribute__" = "yes"; then
11951195
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
1196+
V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
1197+
else
1198+
V_DEFS="$V_DEFS -D_U_=\"\""
11961199
fi
11971200
AC_MSG_RESULT($ac_cv___attribute__)
11981201
])

Diff for: addrtoname.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
* Internet, ethernet, port, and protocol string to address
2222
* and address to string conversion routines
2323
*/
24+
#ifndef lint
25+
static const char rcsid[] _U_ =
26+
"@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.98 2003-11-16 09:36:08 guy Exp $ (LBL)";
27+
#endif
2428

2529
#ifdef HAVE_CONFIG_H
2630
#include "config.h"
@@ -52,10 +56,6 @@ struct rtentry; /* declarations in <net/if.h> */
5256
#include "llc.h"
5357
#include "setsignal.h"
5458

55-
#ifndef lint
56-
static const char rcsid[] _U_ =
57-
"@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.97 2003-11-15 00:39:12 guy Exp $ (LBL)";
58-
#endif
5959
/*
6060
* hash tables for whatever-to-name translations
6161
*

Diff for: bpf_dump.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1919
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2020
*/
21+
#ifndef lint
22+
static const char rcsid[] _U_ =
23+
"@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.16 2003-11-16 09:36:08 guy Exp $ (LBL)";
24+
#endif
2125

2226
#ifdef HAVE_CONFIG_H
2327
#include "config.h"
@@ -30,10 +34,6 @@
3034

3135
#include "interface.h"
3236

33-
#ifndef lint
34-
static const char rcsid[] _U_ =
35-
"@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.15 2003-11-15 00:39:12 guy Exp $ (LBL)";
36-
#endif
3737
void
3838
bpf_dump(struct bpf_program *p, int option)
3939
{

Diff for: configure.in

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.169 2003-08-01 01:18:24 fenner Exp $ (LBL)
1+
dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.170 2003-11-16 09:36:09 guy Exp $ (LBL)
22
dnl
33
dnl Copyright (c) 1994, 1995, 1996, 1997
44
dnl The Regents of the University of California. All rights reserved.
55
dnl
66
dnl Process this file with autoconf to produce a configure script.
77
dnl
88

9-
AC_REVISION($Revision: 1.169 $)
9+
AC_REVISION($Revision: 1.170 $)
1010
AC_PREREQ(2.13)
1111
AC_INIT(tcpdump.c)
1212

@@ -732,6 +732,7 @@ fi
732732
])
733733

734734
AC_SUBST(V_CCOPT)
735+
AC_SUBST(V_DEFS)
735736
AC_SUBST(V_GROUP)
736737
AC_SUBST(V_INCLS)
737738
AC_SUBST(V_PCAPDEP)

Diff for: gmpls.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
* Original code by Hannes Gredler ([email protected])
1414
*/
1515

16+
#ifndef lint
17+
static const char rcsid[] _U_ =
18+
"@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.4 2003-11-16 09:36:09 guy Exp $ (LBL)";
19+
#endif
1620

1721
#ifdef HAVE_CONFIG_H
1822
#include "config.h"
@@ -22,10 +26,6 @@
2226

2327
#include "interface.h"
2428

25-
#ifndef lint
26-
static const char rcsid[] _U_ =
27-
"@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.3 2003-11-15 00:39:13 guy Exp $ (LBL)";
28-
#endif
2929
/* rfc3471 */
3030
struct tok gmpls_link_prot_values[] = {
3131
{ 0x01, "Extra Traffic"},

Diff for: gmt2local.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,17 @@
1919
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2020
*/
2121

22+
#ifndef lint
23+
static const char rcsid[] _U_ =
24+
"@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.9 2003-11-16 09:36:09 guy Exp $ (LBL)";
25+
#endif
2226

2327
#ifdef HAVE_CONFIG_H
2428
#include "config.h"
2529
#endif
2630

2731
#include <tcpdump-stdinc.h>
2832

29-
30-
#include "interface.h"
31-
32-
#ifndef lint
33-
static const char rcsid[] _U_ =
34-
"@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.8 2003-11-15 00:39:13 guy Exp $ (LBL)";
35-
#endif
36-
3733
#include <stdio.h>
3834

3935
#ifdef HAVE_OS_PROTO_H

Diff for: interface.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1919
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2020
*
21-
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.217 2003-11-05 06:02:58 guy Exp $ (LBL)
21+
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.218 2003-11-16 09:36:10 guy Exp $ (LBL)
2222
*/
2323

2424
#ifndef tcpdump_interface_h
@@ -32,8 +32,6 @@
3232
#define __attribute__(x)
3333
#endif
3434

35-
#define _U_ __attribute__((unused))
36-
3735
/* snprintf et al */
3836

3937
#include <stdarg.h>

Diff for: machdep.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2020
*/
2121

22+
#ifndef lint
23+
static const char rcsid[] _U_ =
24+
"@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.12 2003-11-16 09:36:10 guy Exp $ (LBL)";
25+
#endif
2226

2327
#ifdef HAVE_CONFIG_H
2428
#include "config.h"
@@ -32,14 +36,6 @@
3236
*/
3337
#include <tcpdump-stdinc.h>
3438

35-
36-
#include "interface.h"
37-
38-
#ifndef lint
39-
static const char rcsid[] _U_ =
40-
"@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.11 2003-11-15 00:39:13 guy Exp $ (LBL)";
41-
#endif
42-
4339
#ifndef HAVE___ATTRIBUTE__
4440
#define __attribute__(x)
4541
#endif /* HAVE___ATTRIBUTE__ */

Diff for: missing/datalinks.c

+5-7
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,17 @@
3131
* SUCH DAMAGE.
3232
*/
3333

34+
#ifndef lint
35+
static const char rcsid[] _U_ =
36+
"@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.3 2003-11-16 09:36:47 guy Exp $ (LBL)";
37+
#endif
38+
3439
#ifdef HAVE_CONFIG_H
3540
#include "config.h"
3641
#endif
3742

3843
#include <tcpdump-stdinc.h>
3944

40-
#include "interface.h"
41-
42-
#ifndef lint
43-
static const char rcsid[] _U_ =
44-
"@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.2 2003-11-15 00:39:46 guy Exp $ (LBL)";
45-
#endif
46-
4745
#include <pcap.h>
4846
#include <stdlib.h>
4947
#include <stdio.h>

Diff for: missing/dlnames.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,17 @@
3131
* SUCH DAMAGE.
3232
*/
3333

34+
#ifndef lint
35+
static const char rcsid[] _U_ =
36+
"@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.4 2003-11-16 09:36:47 guy Exp $ (LBL)";
37+
#endif
3438

3539
#ifdef HAVE_CONFIG_H
3640
#include "config.h"
3741
#endif
3842

3943
#include <tcpdump-stdinc.h>
4044

41-
42-
#include "interface.h"
43-
44-
#ifndef lint
45-
static const char rcsid[] _U_ =
46-
"@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.3 2003-11-15 00:39:47 guy Exp $ (LBL)";
47-
#endif
48-
4945
#include <pcap.h>
5046
#include <string.h>
5147

Diff for: missing/getaddrinfo.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,9 @@
4949
#include <config.h>
5050
#endif
5151

52-
#include "tcpdump-stdinc.h"
53-
54-
#include "interface.h"
55-
56-
5752
#ifndef lint
58-
static const char rcsid[] =
59-
"@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.12 2003-11-15 00:39:47 guy Exp $";
53+
static const char rcsid[] _U_ =
54+
"@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.13 2003-11-16 09:36:48 guy Exp $";
6055
#endif
6156

6257
#include <sys/types.h>

Diff for: missing/getnameinfo.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,9 @@
4141
#include <config.h>
4242
#endif
4343

44-
#include "tcpdump-stdinc.h"
45-
46-
#include "interface.h"
47-
48-
4944
#ifndef lint
50-
static const char rcsid[] =
51-
"@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.10 2003-11-15 00:39:47 guy Exp $";
45+
static const char rcsid[] _U_ =
46+
"@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.11 2003-11-16 09:36:49 guy Exp $";
5247
#endif
5348

5449
#include <sys/types.h>

Diff for: missing/inet_aton.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,15 @@
3636
* SUCH DAMAGE.
3737
*/
3838

39-
/* $Id: inet_aton.c,v 1.5 2003-11-15 00:39:47 guy Exp $ */
40-
41-
42-
#include <tcpdump-stdinc.h>
43-
44-
45-
#include "interface.h"
39+
/* $Id: inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $ */
4640

4741
#ifndef lint
4842
static const char rcsid[] _U_ =
49-
"@(#) $Header: /tcpdump/master/tcpdump/missing/inet_aton.c,v 1.5 2003-11-15 00:39:47 guy Exp $";
43+
"@(#) $Header: /tcpdump/master/tcpdump/missing/inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $";
5044
#endif
5145

46+
#include <tcpdump-stdinc.h>
47+
5248
/* Minimal implementation of inet_aton.
5349
* Cannot distinguish between failure and a local broadcast address. */
5450

Diff for: missing/inet_ntop.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,15 @@
3636
* SUCH DAMAGE.
3737
*/
3838

39-
/* $Id: inet_ntop.c,v 1.6 2003-11-15 00:39:48 guy Exp $ */
40-
41-
42-
#include <tcpdump-stdinc.h>
43-
44-
45-
#include "interface.h"
39+
/* $Id: inet_ntop.c,v 1.7 2003-11-16 09:36:50 guy Exp $ */
4640

4741
#ifndef lint
4842
static const char rcsid[] _U_ =
49-
"@(#) $Header: /tcpdump/master/tcpdump/missing/inet_ntop.c,v 1.6 2003-11-15 00:39:48 guy Exp $";
43+
"@(#) $Header: /tcpdump/master/tcpdump/missing/inet_ntop.c,v 1.7 2003-11-16 09:36:50 guy Exp $";
5044
#endif
5145

46+
#include <tcpdump-stdinc.h>
47+
5248
#include <stdio.h>
5349
#include <errno.h>
5450

Diff for: missing/inet_pton.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,15 @@
3636
* SUCH DAMAGE.
3737
*/
3838

39-
/* $Id: inet_pton.c,v 1.5 2003-11-15 00:39:48 guy Exp $ */
40-
41-
42-
#include <tcpdump-stdinc.h>
43-
44-
45-
#include "interface.h"
39+
/* $Id: inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $ */
4640

4741
#ifndef lint
4842
static const char rcsid[] _U_ =
49-
"@(#) $Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.5 2003-11-15 00:39:48 guy Exp $";
43+
"@(#) $Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $";
5044
#endif
5145

46+
#include <tcpdump-stdinc.h>
47+
5248
#include <errno.h>
5349

5450
int

Diff for: missing/snprintf.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,16 @@
3131
* SUCH DAMAGE.
3232
*/
3333

34-
/* $Id: snprintf.c,v 1.7 2003-11-15 00:39:48 guy Exp $ */
34+
/* $Id: snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $ */
3535

3636
#ifdef HAVE_CONFIG_H
3737
#include <config.h>
3838
#endif
3939

40+
#ifndef lint
41+
static const char rcsid[] _U_ =
42+
"@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $";
43+
#endif
4044

4145
#include <stdio.h>
4246
#include <stdarg.h>
@@ -47,10 +51,6 @@
4751

4852
#include <interface.h>
4953

50-
#ifndef lint
51-
static const char rcsid[] _U_ =
52-
"@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.7 2003-11-15 00:39:48 guy Exp $";
53-
#endif
5454
enum format_flags {
5555
minus_flag = 1,
5656
plus_flag = 2,

0 commit comments

Comments
 (0)