Lose underscores in some macro names. [skip ci]

This commit is contained in:
Denis Ovsienko 2020-09-13 16:06:43 +01:00
parent 8b967ff74d
commit 6ff13bdf40
6 changed files with 23 additions and 28 deletions

6
ah.h
View File

@ -34,8 +34,8 @@
* RFC1826/2402 authentication header.
*/
#ifndef _NETINET6_AH_H_
#define _NETINET6_AH_H_
#ifndef ND_AH_H_
#define ND_AH_H_
struct ah {
nd_uint8_t ah_nxt; /* Next Header */
@ -54,4 +54,4 @@ struct newah {
/* variable size, 32bit bound*/ /* Authentication data */
};
#endif /*_NETINET6_AH_H_*/
#endif /* ND_AH_H_ */

View File

@ -27,8 +27,8 @@
* OF SUCH DAMAGE.
*/
#ifndef _CPACK_H
#define _CPACK_H
#ifndef ND_CPACK_H
#define ND_CPACK_H
#include "netdissect.h"
@ -54,4 +54,4 @@ const uint8_t *cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize);
extern int cpack_advance(struct cpack_state *, const size_t);
#endif /* _CPACK_H */
#endif /* ND_CPACK_H */

View File

@ -34,8 +34,8 @@
* SUCH DAMAGE.
*/
#ifndef _GETSERVENT_H
#define _GETSERVENT_H
#ifndef ND_GETSERVENT_H
#define ND_GETSERVENT_H
#ifdef _NETDB_H_
/* Just in case... */
@ -64,4 +64,4 @@ void endservent (void);
struct servent *getservent(void);
void setservent (int f);
#endif /* !_GETSERVENT_H */
#endif /* ! ND_GETSERVENT_H */

6
ip6.h
View File

@ -65,8 +65,8 @@
* @(#)ip.h 8.1 (Berkeley) 6/10/93
*/
#ifndef _NETINET_IP6_H_
#define _NETINET_IP6_H_
#ifndef ND_IP6_H_
#define ND_IP6_H_
/*
* Definition for internet protocol version 6.
@ -209,4 +209,4 @@ struct ip6_frag {
#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
#endif /* not _NETINET_IP6_H_ */
#endif /* not ND_IP6_H_ */

View File

@ -30,8 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _GETOPT_LONG_H_
#define _GETOPT_LONG_H_
#ifndef ND_GETOPT_LONG_H_
#define ND_GETOPT_LONG_H_
/*
* GNU-like getopt_long()/getopt_long_only() with 4.4BSD optreset extension.
@ -63,4 +63,4 @@ int getopt_long_only(int, char * const *, const char *,
extern char *optarg; /* getopt(3) external variables */
extern int optind, opterr, optopt;
#endif /* !_GETOPT_LONG_H_ */
#endif /* ! ND_GETOPT_LONG_H_ */

View File

@ -30,13 +30,8 @@
/* Operations on timevals. */
#ifndef _MICRO_PER_SEC
#define _MICRO_PER_SEC 1000000
#endif
#ifndef _NANO_PER_SEC
#define _NANO_PER_SEC 1000000000
#endif
#define ND_MICRO_PER_SEC 1000000
#define ND_NANO_PER_SEC 1000000000
#define netdissect_timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
@ -52,14 +47,14 @@
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
if (nano_prec) { \
if ((vvp)->tv_usec >= _NANO_PER_SEC) { \
if ((vvp)->tv_usec >= ND_NANO_PER_SEC) { \
(vvp)->tv_sec++; \
(vvp)->tv_usec -= _NANO_PER_SEC; \
(vvp)->tv_usec -= ND_NANO_PER_SEC; \
} \
} else { \
if ((vvp)->tv_usec >= _MICRO_PER_SEC) { \
if ((vvp)->tv_usec >= ND_MICRO_PER_SEC) { \
(vvp)->tv_sec++; \
(vvp)->tv_usec -= _MICRO_PER_SEC; \
(vvp)->tv_usec -= ND_MICRO_PER_SEC; \
} \
} \
} while (0)
@ -70,8 +65,8 @@
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
if ((vvp)->tv_usec < 0) { \
(vvp)->tv_sec--; \
(vvp)->tv_usec += (nano_prec ? _NANO_PER_SEC : \
_MICRO_PER_SEC); \
(vvp)->tv_usec += (nano_prec ? ND_NANO_PER_SEC : \
ND_MICRO_PER_SEC); \
} \
} while (0)