Skip to content

Commit

Permalink
- Fix #270: reserved identifier violation.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcawijngaards committed Feb 23, 2023
1 parent b776a7a commit b7fa86f
Show file tree
Hide file tree
Showing 27 changed files with 79 additions and 75 deletions.
6 changes: 3 additions & 3 deletions answer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _ANSWER_H_
#define _ANSWER_H_
#ifndef ANSWER_H
#define ANSWER_H

#include <sys/types.h>

Expand Down Expand Up @@ -44,4 +44,4 @@ int answer_add_rrset(answer_type *answer, rr_section_type section,
domain_type *domain, rrset_type *rrset);


#endif /* _ANSWER_H_ */
#endif /* ANSWER_H */
6 changes: 3 additions & 3 deletions axfr.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _AXFR_H_
#define _AXFR_H_
#ifndef AXFR_H
#define AXFR_H

#include "nsd.h"
#include "query.h"
Expand All @@ -22,4 +22,4 @@
query_state_type answer_axfr_ixfr(struct nsd *nsd, struct query *q);
query_state_type query_axfr(struct nsd *nsd, struct query *query, int wstats);

#endif /* _AXFR_H_ */
#endif /* AXFR_H */
6 changes: 3 additions & 3 deletions bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* See LICENSE for the license.
*
*/
#ifndef _BITSET_H_
#define _BITSET_H_
#ifndef BITSET_H
#define BITSET_H

#include <assert.h>
#include <limits.h>
Expand Down Expand Up @@ -37,4 +37,4 @@ void nsd_bitset_or(
struct nsd_bitset *srcset1,
struct nsd_bitset *srcset2);

#endif /* _BITSET_H_ */
#endif /* BITSET_H */
6 changes: 3 additions & 3 deletions buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* the java.nio.Buffer interface.
*/

#ifndef _BUFFER_H_
#define _BUFFER_H_
#ifndef BUFFER_H
#define BUFFER_H

#include <assert.h>
#include <stdarg.h>
Expand Down Expand Up @@ -411,4 +411,4 @@ buffer_read_u64(buffer_type *buffer)
int buffer_printf(buffer_type *buffer, const char *format, ...)
ATTR_FORMAT(printf, 2, 3);

#endif /* _BUFFER_H_ */
#endif /* BUFFER_H */
6 changes: 3 additions & 3 deletions compat/cpuset.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* See LICENSE for the license.
*
*/
#ifndef _CPUSET_H_
#define _CPUSET_H_
#ifndef CPUSET_H
#define CPUSET_H

#ifdef HAVE_SCHED_H
# include <sched.h>
Expand Down Expand Up @@ -76,4 +76,4 @@ size_t cpuset_size(const cpuset_t *set);

void cpuset_or(cpuset_t *destset, const cpuset_t *srcset);

#endif /* _CPUSET_H_ */
#endif /* CPUSET_H */
6 changes: 3 additions & 3 deletions compat/fake-rfc2553.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
* that ai_family is AF_INET. Don't use it for another purpose.
*/

#ifndef _FAKE_RFC2553_H
#define _FAKE_RFC2553_H
#ifndef FAKE_RFC2553_H
#define FAKE_RFC2553_H

#include <config.h>
#include <sys/types.h>
Expand Down Expand Up @@ -177,5 +177,5 @@ int getnameinfo(const struct sockaddr *, size_t, char *, size_t,
char *, size_t, int);
#endif /* !HAVE_GETNAMEINFO */

#endif /* !_FAKE_RFC2553_H */
#endif /* !FAKE_RFC2553_H */

6 changes: 3 additions & 3 deletions dname.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _DNAME_H_
#define _DNAME_H_
#ifndef DNAME_H
#define DNAME_H

#include <assert.h>
#include <stdio.h>
Expand Down Expand Up @@ -381,4 +381,4 @@ char* wirelabel2str(const uint8_t* label);
/** check if two uncompressed dnames of the same total length are equal */
int dname_equal_nocase(uint8_t* a, uint8_t* b, uint16_t len);

#endif /* _DNAME_H_ */
#endif /* DNAME_H */
6 changes: 3 additions & 3 deletions dns.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _DNS_H_
#define _DNS_H_
#ifndef DNS_H
#define DNS_H

enum rr_section {
QUESTION_SECTION,
Expand Down Expand Up @@ -305,4 +305,4 @@ operator++(rr_section_type &lhs)
}
#endif /* __cplusplus */

#endif /* _DNS_H_ */
#endif /* DNS_H */
3 changes: 3 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
23 February 2022: Wouter
- Fix #270: reserved identifier violation.

20 February 2022: Wouter
- Merge #269 from Fale: Add systemd service unit.

Expand Down
1 change: 1 addition & 0 deletions doc/RELNOTES
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ BUG FIXES:
- Merge #265: Fix C99 compatibility issue.
- Fix #266: Fix build with --without-ssl.
- Fix for #267: neater variable definitions.
- Fix #270: reserved identifier violation.

4.6.1
================
Expand Down
6 changes: 3 additions & 3 deletions edns.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _EDNS_H_
#define _EDNS_H_
#ifndef EDNS_H
#define EDNS_H

#include "buffer.h"
struct nsd;
Expand Down Expand Up @@ -103,4 +103,4 @@ void edns_init_nsid(edns_data_type *data, uint16_t nsid_len);
void cookie_verify(struct query *q, struct nsd* nsd, uint32_t *now_p);
void cookie_create(struct query *q, struct nsd* nsd, uint32_t *now_p);

#endif /* _EDNS_H_ */
#endif /* EDNS_H */
6 changes: 3 additions & 3 deletions ixfr.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _IXFR_H_
#define _IXFR_H_
#ifndef IXFR_H
#define IXFR_H
struct nsd;
#include "query.h"
#include "rbtree.h"
Expand Down Expand Up @@ -265,4 +265,4 @@ int ixfr_unlink_it(const char* zname, const char* zfile, int file_num,
void ixfr_delete_superfluous_files(struct zone* zone, const char* zfile,
int dest_num_files);

#endif /* _IXFR_H_ */
#endif /* IXFR_H */
6 changes: 3 additions & 3 deletions ixfrcreate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _IXFRCREATE_H_
#define _IXFRCREATE_H_
#ifndef IXFRCREATE_H
#define IXFRCREATE_H
#include "dns.h"
struct zone;
struct nsd;
Expand Down Expand Up @@ -83,4 +83,4 @@ struct spool_dname_iterator {
char* file_name;
};

#endif /* _IXFRCREATE_H_ */
#endif /* IXFRCREATE_H */
6 changes: 3 additions & 3 deletions namedb.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _NAMEDB_H_
#define _NAMEDB_H_
#ifndef NAMEDB_H
#define NAMEDB_H

#include <stdio.h>

Expand Down Expand Up @@ -466,4 +466,4 @@ void zone_rr_iter_init(zone_rr_iter_type *iter, zone_type *zone);

rr_type *zone_rr_iter_next(zone_rr_iter_type *iter);

#endif /* _NAMEDB_H_ */
#endif /* NAMEDB_H */
6 changes: 3 additions & 3 deletions netio.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
* blocked in pselect(2).
*/

#ifndef _NETIO_H_
#define _NETIO_H_
#ifndef NETIO_H
#define NETIO_H

#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
Expand Down Expand Up @@ -187,4 +187,4 @@ operator |= (netio_event_types_type &lhs, netio_event_types_type rhs) {
}
#endif /* __cplusplus */

#endif /* _NETIO_H_ */
#endif /* NETIO_H */
6 changes: 3 additions & 3 deletions nsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _NSD_H_
#define _NSD_H_
#ifndef NSD_H
#define NSD_H

#include <signal.h>
#include <net/if.h>
Expand Down Expand Up @@ -407,4 +407,4 @@ void perform_openssl_init(void);
#endif
ssize_t block_read(struct nsd* nsd, int s, void* p, ssize_t sz, int timeout);

#endif /* _NSD_H_ */
#endif /* NSD_H */
6 changes: 3 additions & 3 deletions packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _PACKET_H_
#define _PACKET_H_
#ifndef PACKET_H
#define PACKET_H

#include <sys/types.h>

Expand Down Expand Up @@ -202,4 +202,4 @@ int packet_read_query_section(buffer_type *packet,
* returns false on no-serial found or parse failure. */
int packet_find_notify_serial(buffer_type *packet, uint32_t* serial);

#endif /* _PACKET_H_ */
#endif /* PACKET_H */
6 changes: 3 additions & 3 deletions popen3.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* See LICENSE for the license.
*
*/
#ifndef _POPEN3_H_
#define _POPEN3_H_
#ifndef POPEN3_H
#define POPEN3_H

#include <stdio.h>
#include <sys/types.h>
Expand All @@ -24,4 +24,4 @@ pid_t popen3(char *const *command,
int *fdoutptr,
int *fderrptr);

#endif /* _POPEN3_H_ */
#endif /* POPEN3_H */
6 changes: 3 additions & 3 deletions query.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _QUERY_H_
#define _QUERY_H_
#ifndef QUERY_H
#define QUERY_H

#include <assert.h>
#include <string.h>
Expand Down Expand Up @@ -230,4 +230,4 @@ query_overflow(query_type *q)
{
return buffer_position(q->packet) > (q->maxlen - q->reserved_space);
}
#endif /* _QUERY_H_ */
#endif /* QUERY_H */
6 changes: 3 additions & 3 deletions rbtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _RBTREE_H_
#define _RBTREE_H_
#ifndef RBTREE_H
#define RBTREE_H

#include "region-allocator.h"

Expand Down Expand Up @@ -73,4 +73,4 @@ rbnode_type *rbtree_previous(rbnode_type *rbtree);
(rbnode_type*)node != RBTREE_NULL; \
node = (type)rbtree_next((rbnode_type*)node))

#endif /* _RBTREE_H_ */
#endif /* RBTREE_H */
6 changes: 3 additions & 3 deletions rdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _RDATA_H_
#define _RDATA_H_
#ifndef RDATA_H
#define RDATA_H

#include "dns.h"
#include "namedb.h"
Expand Down Expand Up @@ -58,4 +58,4 @@ int rdata_atoms_to_unknown_string(buffer_type *out,
int print_rdata(buffer_type *output, rrtype_descriptor_type *descriptor,
rr_type *record);

#endif /* _DNS_H_ */
#endif /* RDATA_H */
6 changes: 3 additions & 3 deletions region-allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _REGION_ALLOCATOR_H_
#define _REGION_ALLOCATOR_H_
#ifndef REGION_ALLOCATOR_H
#define REGION_ALLOCATOR_H

#include <stdio.h>

Expand Down Expand Up @@ -150,4 +150,4 @@ size_t region_get_mem_unused(region_type* region);
/* Debug print REGION statistics to LOG. */
void region_log_stats(region_type *region);

#endif /* _REGION_ALLOCATOR_H_ */
#endif /* REGION_ALLOCATOR_H */
6 changes: 3 additions & 3 deletions tsig-openssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _TSIG_OPENSSL_H_
#define _TSIG_OPENSSL_H_
#ifndef TSIG_OPENSSL_H
#define TSIG_OPENSSL_H

#if defined(HAVE_SSL)

Expand All @@ -26,4 +26,4 @@ void tsig_openssl_finalize(void);

#endif /* defined(HAVE_SSL) */

#endif /* _TSIG_H_ */
#endif /* TSIG_OPENSSL_H */
6 changes: 3 additions & 3 deletions tsig.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*
*/

#ifndef _TSIG_H_
#define _TSIG_H_
#ifndef TSIG_H
#define TSIG_H

#include <sys/types.h>
#include <sys/socket.h>
Expand Down Expand Up @@ -289,4 +289,4 @@ int tsig_strlowercmp(const char* str1, const char* str2);
*/
void tsig_finalize(void);

#endif /* _TSIG_H_ */
#endif /* TSIG_H */
Loading

0 comments on commit b7fa86f

Please sign in to comment.