[PATCH] include: Switch to #pragma once pattern

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

246tnt at gmail.com 246tnt at gmail.com
Mon Jun 16 08:23:04 UTC 2014


From: Sylvain Munaut <tnt at 246tNt.com>

Signed-off-by: Sylvain Munaut <tnt at 246tNt.com>
---
 include/osmocom/codec/codec.h                 | 5 +----
 include/osmocom/core/application.h            | 5 +----
 include/osmocom/core/backtrace.h              | 5 +----
 include/osmocom/core/bits.h                   | 5 +----
 include/osmocom/core/bitvec.h                 | 5 +----
 include/osmocom/core/conv.h                   | 5 +----
 include/osmocom/core/crc16.h                  | 5 +----
 include/osmocom/core/crcXXgen.h.tpl           | 5 +----
 include/osmocom/core/crcgen.h                 | 5 +----
 include/osmocom/core/defs.h                   | 5 +----
 include/osmocom/core/gsmtap.h                 | 5 +----
 include/osmocom/core/gsmtap_util.h            | 5 +----
 include/osmocom/core/linuxlist.h              | 6 +-----
 include/osmocom/core/linuxrbtree.h            | 5 +----
 include/osmocom/core/logging.h                | 5 +----
 include/osmocom/core/loggingrb.h              | 5 +----
 include/osmocom/core/msgb.h                   | 5 +----
 include/osmocom/core/msgfile.h                | 5 +----
 include/osmocom/core/panic.h                  | 5 +----
 include/osmocom/core/plugin.h                 | 5 +----
 include/osmocom/core/prim.h                   | 5 +----
 include/osmocom/core/rate_ctr.h               | 4 +---
 include/osmocom/core/select.h                 | 5 +----
 include/osmocom/core/serial.h                 | 5 +----
 include/osmocom/core/signal.h                 | 5 +----
 include/osmocom/core/socket.h                 | 5 +----
 include/osmocom/core/statistics.h             | 5 +----
 include/osmocom/core/strrb.h                  | 5 +----
 include/osmocom/core/talloc.h                 | 5 +----
 include/osmocom/core/timer.h                  | 5 +----
 include/osmocom/core/timer_compat.h           | 5 +----
 include/osmocom/core/utils.h                  | 5 +----
 include/osmocom/core/write_queue.h            | 5 +----
 include/osmocom/crypt/auth.h                  | 5 +----
 include/osmocom/crypt/gprs_cipher.h           | 5 +----
 include/osmocom/gprs/gprs_bssgp.h             | 5 +----
 include/osmocom/gprs/gprs_bssgp_bss.h         | 4 +---
 include/osmocom/gprs/gprs_msgb.h              | 4 +---
 include/osmocom/gprs/gprs_ns.h                | 5 +----
 include/osmocom/gprs/gprs_ns_frgre.h          | 5 +----
 include/osmocom/gprs/protocol/gsm_08_16.h     | 5 +----
 include/osmocom/gprs/protocol/gsm_08_18.h     | 5 +----
 include/osmocom/gsm/a5.h                      | 5 +----
 include/osmocom/gsm/abis_nm.h                 | 5 +----
 include/osmocom/gsm/comp128.h                 | 6 +-----
 include/osmocom/gsm/comp128v23.h              | 5 +----
 include/osmocom/gsm/gan.h                     | 5 +----
 include/osmocom/gsm/gsm0411_smc.h             | 5 +----
 include/osmocom/gsm/gsm0411_smr.h             | 6 +-----
 include/osmocom/gsm/gsm0411_utils.h           | 5 +----
 include/osmocom/gsm/gsm0480.h                 | 5 +----
 include/osmocom/gsm/gsm0502.h                 | 5 +----
 include/osmocom/gsm/gsm0808.h                 | 5 +----
 include/osmocom/gsm/gsm48.h                   | 5 +----
 include/osmocom/gsm/gsm48_ie.h                | 5 +----
 include/osmocom/gsm/gsm_utils.h               | 6 +-----
 include/osmocom/gsm/l1sap.h                   | 5 +----
 include/osmocom/gsm/lapd_core.h               | 5 +----
 include/osmocom/gsm/lapdm.h                   | 5 +----
 include/osmocom/gsm/meas_rep.h                | 5 +----
 include/osmocom/gsm/mncc.h                    | 5 +----
 include/osmocom/gsm/prim.h                    | 5 +----
 include/osmocom/gsm/protocol/gsm_03_41.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_04_08.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_04_11.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_04_12.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_04_80.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_08_08.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_08_58.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_12_21.h      | 5 +----
 include/osmocom/gsm/protocol/gsm_44_318.h     | 4 +---
 include/osmocom/gsm/protocol/ipaccess.h       | 5 +----
 include/osmocom/gsm/protocol/smpp34_osmocom.h | 5 +----
 include/osmocom/gsm/rsl.h                     | 5 +----
 include/osmocom/gsm/rxlev_stat.h              | 5 +----
 include/osmocom/gsm/sysinfo.h                 | 5 +----
 include/osmocom/gsm/tlv.h                     | 5 +----
 include/osmocom/vty/buffer.h                  | 5 +----
 include/osmocom/vty/command.h                 | 4 +---
 include/osmocom/vty/logging.h                 | 5 +----
 include/osmocom/vty/misc.h                    | 5 +----
 include/osmocom/vty/telnet_interface.h        | 5 +----
 include/osmocom/vty/vector.h                  | 5 +----
 include/osmocom/vty/vty.h                     | 5 +----
 src/gsm/milenage/aes.h                        | 5 +----
 src/gsm/milenage/aes_i.h                      | 5 +----
 src/gsm/milenage/aes_wrap.h                   | 5 +----
 src/gsm/milenage/milenage.h                   | 5 +----
 88 files changed, 88 insertions(+), 351 deletions(-)

diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h
index 81f5d4b..d126e0f 100644
--- a/include/osmocom/codec/codec.h
+++ b/include/osmocom/codec/codec.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCOM_CODEC_H
-#define _OSMOCOM_CODEC_H
+#pragma once
 
 #include <stdint.h>
 
@@ -16,5 +15,3 @@ extern const uint16_t gsm690_6_7_bitorder[];	/* AMR  6.7  kbits */
 extern const uint16_t gsm690_5_9_bitorder[];	/* AMR  5.9  kbits */
 extern const uint16_t gsm690_5_15_bitorder[];	/* AMR  5.15 kbits */
 extern const uint16_t gsm690_4_75_bitorder[];	/* AMR  4.75 kbits */
-
-#endif /* _OSMOCOM_CODEC_H */
diff --git a/include/osmocom/core/application.h b/include/osmocom/core/application.h
index 3457169..ecaeaa8 100644
--- a/include/osmocom/core/application.h
+++ b/include/osmocom/core/application.h
@@ -1,5 +1,4 @@
-#ifndef OSMO_APPLICATION_H
-#define OSMO_APPLICATION_H
+#pragma once
 
 /*!
  * \file application.h
@@ -19,5 +18,3 @@ void osmo_init_ignore_signals(void);
 int osmo_init_logging(const struct log_info *);
 
 int osmo_daemonize(void);
-
-#endif
diff --git a/include/osmocom/core/backtrace.h b/include/osmocom/core/backtrace.h
index a24290c..0c9b6ef 100644
--- a/include/osmocom/core/backtrace.h
+++ b/include/osmocom/core/backtrace.h
@@ -1,7 +1,4 @@
-#ifndef _OSMO_BACKTRACE_H_
-#define _OSMO_BACKTRACE_H_
+#pragma once
 
 void osmo_generate_backtrace(void);
 void osmo_log_backtrace(int subsys, int level);
-
-#endif
diff --git a/include/osmocom/core/bits.h b/include/osmocom/core/bits.h
index 4c68532..d4ab505 100644
--- a/include/osmocom/core/bits.h
+++ b/include/osmocom/core/bits.h
@@ -1,5 +1,4 @@
-#ifndef _OSMO_BITS_H
-#define _OSMO_BITS_H
+#pragma once
 
 #include <stdint.h>
 
@@ -74,5 +73,3 @@ uint32_t osmo_revbytebits_8(uint8_t x);
 void osmo_revbytebits_buf(uint8_t *buf, int len);
 
 /*! @} */
-
-#endif /* _OSMO_BITS_H */
diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h
index 9c000d0..3138226 100644
--- a/include/osmocom/core/bitvec.h
+++ b/include/osmocom/core/bitvec.h
@@ -1,5 +1,4 @@
-#ifndef _BITVEC_H
-#define _BITVEC_H
+#pragma once
 
 /* bit vector utility routines */
 
@@ -66,5 +65,3 @@ int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value
 int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit);
 
 /*! @} */
-
-#endif /* _BITVEC_H */
diff --git a/include/osmocom/core/conv.h b/include/osmocom/core/conv.h
index 4cc791f..e7f6bd6 100644
--- a/include/osmocom/core/conv.h
+++ b/include/osmocom/core/conv.h
@@ -28,8 +28,7 @@
  * Osmocom convolutional encoder and decoder
  */
 
-#ifndef __OSMO_CONV_H__
-#define __OSMO_CONV_H__
+#pragma once
 
 #include <stdint.h>
 
@@ -142,5 +141,3 @@ int osmo_conv_decode(const struct osmo_conv_code *code,
 
 
 /*! @} */
-
-#endif /* __OSMO_CONV_H__ */
diff --git a/include/osmocom/core/crc16.h b/include/osmocom/core/crc16.h
index 0e52417..83b2e5f 100644
--- a/include/osmocom/core/crc16.h
+++ b/include/osmocom/core/crc16.h
@@ -15,8 +15,7 @@
  * Version 2. See the file COPYING for more details.
  */
 
-#ifndef __CRC16_H
-#define __CRC16_H
+#pragma once
 
 #include <stdint.h>
 
@@ -30,5 +29,3 @@ static inline uint16_t osmo_crc16_byte(uint16_t crc, const uint8_t data)
 {
 	return (crc >> 8) ^ osmo_crc16_table[(crc ^ data) & 0xff];
 }
-
-#endif /* __CRC16_H */
diff --git a/include/osmocom/core/crcXXgen.h.tpl b/include/osmocom/core/crcXXgen.h.tpl
index a931bc3..164f720 100644
--- a/include/osmocom/core/crcXXgen.h.tpl
+++ b/include/osmocom/core/crcXXgen.h.tpl
@@ -20,8 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __OSMO_CRCXXGEN_H__
-#define __OSMO_CRCXXGEN_H__
+#pragma once
 
 /*! \addtogroup crcgen
  *  @{
@@ -54,6 +53,4 @@ void osmo_crcXXgen_set_bits(const struct osmo_crcXXgen_code *code,
 
 /*! @} */
 
-#endif /* __OSMO_CRCXXGEN_H__ */
-
 /* vim: set syntax=c: */
diff --git a/include/osmocom/core/crcgen.h b/include/osmocom/core/crcgen.h
index 69cef04..b39b55d 100644
--- a/include/osmocom/core/crcgen.h
+++ b/include/osmocom/core/crcgen.h
@@ -20,8 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __OSMO_CRCGEN_H__
-#define __OSMO_CRCGEN_H__
+#pragma once
 
 /*! \defgroup crcgen Osmocom generic CRC routines
  *  @{
@@ -37,5 +36,3 @@
 #include <osmocom/core/crc64gen.h>
 
 /*! @} */
-
-#endif /* __OSMO_CRCGEN_H__ */
diff --git a/include/osmocom/core/defs.h b/include/osmocom/core/defs.h
index 5ffee04..aebe925 100644
--- a/include/osmocom/core/defs.h
+++ b/include/osmocom/core/defs.h
@@ -1,5 +1,4 @@
-#ifndef OSMOCORE_DEFS_H
-#define OSMOCORE_DEFS_H
+#pragma once
 
 /*! \defgroup utils General-purpose utility functions
  *  @{
@@ -46,5 +45,3 @@
 #undef _OSMO_HAS_ATTRIBUTE_DEPRECATED
 
 /*! @} */
-
-#endif
diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h
index 4694219..69bd108 100644
--- a/include/osmocom/core/gsmtap.h
+++ b/include/osmocom/core/gsmtap.h
@@ -1,5 +1,4 @@
-#ifndef _GSMTAP_H
-#define _GSMTAP_H
+#pragma once
 
 /* gsmtap header, pseudo-header in front of the actua GSM payload */
 
@@ -239,5 +238,3 @@ struct gsmtap_hdr {
 	uint8_t res;		/* reserved for future use (RFU) */
 
 } __attribute__((packed));
-
-#endif /* _GSMTAP_H */
diff --git a/include/osmocom/core/gsmtap_util.h b/include/osmocom/core/gsmtap_util.h
index eaa32a0..a5c03e7 100644
--- a/include/osmocom/core/gsmtap_util.h
+++ b/include/osmocom/core/gsmtap_util.h
@@ -1,5 +1,4 @@
-#ifndef _GSMTAP_UTIL_H
-#define _GSMTAP_UTIL_H
+#pragma once
 
 #include <stdint.h>
 #include <osmocom/core/write_queue.h>
@@ -55,5 +54,3 @@ int gsmtap_send(struct gsmtap_inst *gti, uint16_t arfcn, uint8_t ts,
 		unsigned int len);
 
 /*! @} */
-
-#endif /* _GSMTAP_UTIL_H */
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index fb99c5e..b684152 100644
--- a/include/osmocom/core/linuxlist.h
+++ b/include/osmocom/core/linuxlist.h
@@ -1,5 +1,4 @@
-#ifndef _LINUX_LLIST_H
-#define _LINUX_LLIST_H
+#pragma once
 
 #include <stddef.h>
 
@@ -355,6 +354,3 @@ static inline void llist_splice_init(struct llist_head *llist,
 #define llist_for_each_continue_rcu(pos, head) \
 	for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \
         	(pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next))
-
-
-#endif
diff --git a/include/osmocom/core/linuxrbtree.h b/include/osmocom/core/linuxrbtree.h
index 079f440..ef8bc15 100644
--- a/include/osmocom/core/linuxrbtree.h
+++ b/include/osmocom/core/linuxrbtree.h
@@ -91,8 +91,7 @@ static inline struct page * rb_insert_page_cache(struct inode * inode,
 -----------------------------------------------------------------------
 */
 
-#ifndef	_LINUX_RBTREE_H
-#define	_LINUX_RBTREE_H
+#pragma once
 
 #include <stdlib.h>
 
@@ -156,5 +155,3 @@ static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
 
 	*rb_link = node;
 }
-
-#endif	/* _LINUX_RBTREE_H */
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index 1d57e22..caeea06 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCORE_LOGGING_H
-#define _OSMOCORE_LOGGING_H
+#pragma once
 
 /*! \defgroup logging Osmocom logging framework
  *  @{
@@ -216,5 +215,3 @@ struct log_target *log_target_find(int type, const char *fname);
 extern struct llist_head osmo_log_target_list;
 
 /*! @} */
-
-#endif /* _OSMOCORE_LOGGING_H */
diff --git a/include/osmocom/core/loggingrb.h b/include/osmocom/core/loggingrb.h
index a6f377b..acdccfb 100644
--- a/include/osmocom/core/loggingrb.h
+++ b/include/osmocom/core/loggingrb.h
@@ -1,5 +1,4 @@
-#ifndef _LOGGINGRB_H
-#define _LOGGINGRB_H
+#pragma once
 
 /* (C) 2012-2013 by Katerina Barone-Adesi <kat.obsc at gmail.com>
  * All Rights Reserved
@@ -36,5 +35,3 @@ const char *log_target_rb_get(struct log_target const *target, size_t logindex);
 struct log_target *log_target_create_rb(size_t size);
 
 /*! @} */
-
-#endif /* _LOGGINGRB_H  */
diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 33e8081..bf83d67 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -1,5 +1,4 @@
-#ifndef _MSGB_H
-#define _MSGB_H
+#pragma once
 
 /* (C) 2008 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
@@ -413,5 +412,3 @@ uint8_t *msgb_data(const struct msgb *msg);
 void msgb_set_talloc_ctx(void *ctx);
 
 /*! @} */
-
-#endif /* _MSGB_H */
diff --git a/include/osmocom/core/msgfile.h b/include/osmocom/core/msgfile.h
index c5e67a4..cab97b2 100644
--- a/include/osmocom/core/msgfile.h
+++ b/include/osmocom/core/msgfile.h
@@ -19,8 +19,7 @@
  *
  */
 
-#ifndef MSG_FILE_H
-#define MSG_FILE_H
+#pragma once
 
 #include <osmocom/core/linuxlist.h>
 
@@ -45,5 +44,3 @@ struct osmo_config_list {
 };
 
 struct osmo_config_list* osmo_config_list_parse(void *ctx, const char *filename);
-
-#endif
diff --git a/include/osmocom/core/panic.h b/include/osmocom/core/panic.h
index fd5cf20..5d575c4 100644
--- a/include/osmocom/core/panic.h
+++ b/include/osmocom/core/panic.h
@@ -1,5 +1,4 @@
-#ifndef OSMOCORE_PANIC_H
-#define OSMOCORE_PANIC_H
+#pragma once
 
 /*! \addtogroup utils
  *  @{
@@ -16,5 +15,3 @@ extern void osmo_panic(const char *fmt, ...);
 extern void osmo_set_panic_handler(osmo_panic_handler_t h);
 
 /*! @} */
-
-#endif /* OSMOCORE_PANIC_H */
diff --git a/include/osmocom/core/plugin.h b/include/osmocom/core/plugin.h
index 6c0eccc..aef1dfc 100644
--- a/include/osmocom/core/plugin.h
+++ b/include/osmocom/core/plugin.h
@@ -1,6 +1,3 @@
-#ifndef _OSMO_PLUGIN_H
-#define _OSMO_PLUGIN_H
+#pragma once
 
 int osmo_plugin_load_all(const char *directory);
-
-#endif
diff --git a/include/osmocom/core/prim.h b/include/osmocom/core/prim.h
index f61d808..935ce51 100644
--- a/include/osmocom/core/prim.h
+++ b/include/osmocom/core/prim.h
@@ -1,5 +1,4 @@
-#ifndef OSMO_PRIMITIVE_H
-#define OSMO_PRIMITIVE_H
+#pragma once
 
 /*! \defgroup prim Osmocom primitives
  *  @{
@@ -56,5 +55,3 @@ osmo_prim_init(struct osmo_prim_hdr *oph, unsigned int sap,
 typedef int (*osmo_prim_cb)(struct osmo_prim_hdr *oph, void *ctx);
 
 /*! @} */
-
-#endif /* OSMO_PRIMITIVE_H */
diff --git a/include/osmocom/core/rate_ctr.h b/include/osmocom/core/rate_ctr.h
index 24577fd..821c7cf 100644
--- a/include/osmocom/core/rate_ctr.h
+++ b/include/osmocom/core/rate_ctr.h
@@ -1,5 +1,4 @@
-#ifndef _RATE_CTR_H
-#define _RATE_CTR_H
+#pragma once
 
 /*! \defgroup rate_ctr Rate counters
  *  @{
@@ -85,4 +84,3 @@ struct rate_ctr_group *rate_ctr_get_group_by_name_idx(const char *name, const un
 const struct rate_ctr *rate_ctr_get_by_name(const struct rate_ctr_group *ctrg, const char *name);
 
 /*! @} */
-#endif /* RATE_CTR_H */
diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h
index efdd716..b6b9e82 100644
--- a/include/osmocom/core/select.h
+++ b/include/osmocom/core/select.h
@@ -1,5 +1,4 @@
-#ifndef _BSC_SELECT_H
-#define _BSC_SELECT_H
+#pragma once
 
 #include <osmocom/core/linuxlist.h>
 
@@ -41,5 +40,3 @@ void osmo_fd_unregister(struct osmo_fd *fd);
 int osmo_select_main(int polling);
 
 /*! @} */
-
-#endif /* _BSC_SELECT_H */
diff --git a/include/osmocom/core/serial.h b/include/osmocom/core/serial.h
index 1640a6d..e3f7a9f 100644
--- a/include/osmocom/core/serial.h
+++ b/include/osmocom/core/serial.h
@@ -28,8 +28,7 @@
  * Osmocom serial port helpers
  */
 
-#ifndef __OSMO_SERIAL_H__
-#define __OSMO_SERIAL_H__
+#pragma once
 
 #include <termios.h>
 
@@ -39,5 +38,3 @@ int osmo_serial_set_custom_baudrate(int fd, int baudrate);
 int osmo_serial_clear_custom_baudrate(int fd);
 
 /*! @} */
-
-#endif /* __OSMO_SERIAL_H__ */
diff --git a/include/osmocom/core/signal.h b/include/osmocom/core/signal.h
index 19a2688..6f56496 100644
--- a/include/osmocom/core/signal.h
+++ b/include/osmocom/core/signal.h
@@ -1,5 +1,4 @@
-#ifndef OSMO_SIGNAL_H
-#define OSMO_SIGNAL_H
+#pragma once
 
 #include <stdint.h>
 
@@ -43,5 +42,3 @@ void osmo_signal_unregister_handler(unsigned int subsys, osmo_signal_cbfn *cbfn,
 void osmo_signal_dispatch(unsigned int subsys, unsigned int signal, void *signal_data);
 
 /*! @} */
-
-#endif /* OSMO_SIGNAL_H */
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index cb1b7a8..1df28c9 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCORE_SOCKET_H
-#define _OSMOCORE_SOCKET_H
+#pragma once
 
 /*! \defgroup socket Socket convenience functions
  *  @{
@@ -37,5 +36,3 @@ int osmo_sock_unix_init_ofd(struct osmo_fd *ofd, uint16_t type, uint8_t proto,
 			    const char *socket_path, unsigned int flags);
 
 /*! @} */
-
-#endif /* _OSMOCORE_SOCKET_H */
diff --git a/include/osmocom/core/statistics.h b/include/osmocom/core/statistics.h
index ade0074..de250be 100644
--- a/include/osmocom/core/statistics.h
+++ b/include/osmocom/core/statistics.h
@@ -1,5 +1,4 @@
-#ifndef _STATISTICS_H
-#define _STATISTICS_H
+#pragma once
 
 /*! \file statistics.h
  *  \brief Common routines regarding statistics */
@@ -49,5 +48,3 @@ int osmo_counters_for_each(int (*handle_counter)(struct osmo_counter *, void *),
  *  \returns pointer to counter (\ref osmo_counter) or NULL otherwise
  */
 struct osmo_counter *osmo_counter_get_by_name(const char *name);
-
-#endif /* _STATISTICS_H */
diff --git a/include/osmocom/core/strrb.h b/include/osmocom/core/strrb.h
index cfc56dc..c563d1b 100644
--- a/include/osmocom/core/strrb.h
+++ b/include/osmocom/core/strrb.h
@@ -1,5 +1,4 @@
-#ifndef _STRRB_H
-#define _STRRB_H
+#pragma once
 
 /* (C) 2012-2013 by Katerina Barone-Adesi <kat.obsc at gmail.com>
  * All Rights Reserved
@@ -54,5 +53,3 @@ size_t osmo_strrb_elements(const struct osmo_strrb *rb);
 int osmo_strrb_add(struct osmo_strrb *rb, const char *data);
 
 /*! @} */
-
-#endif /* _STRRB_H */
diff --git a/include/osmocom/core/talloc.h b/include/osmocom/core/talloc.h
index f7f7643..dde102b 100644
--- a/include/osmocom/core/talloc.h
+++ b/include/osmocom/core/talloc.h
@@ -1,5 +1,4 @@
-#ifndef _TALLOC_H_
-#define _TALLOC_H_
+#pragma once
 /* 
    Unix SMB/CIFS implementation.
    Samba temporary memory allocation functions
@@ -188,5 +187,3 @@ char *talloc_asprintf_append(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3
 char *talloc_asprintf_append_buffer(char *s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3);
 
 void talloc_set_abort_fn(void (*abort_fn)(const char *reason));
-
-#endif
diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h
index d37af80..d734357 100644
--- a/include/osmocom/core/timer.h
+++ b/include/osmocom/core/timer.h
@@ -26,8 +26,7 @@
  *  \brief Osmocom timer handling routines
  */
 
-#ifndef TIMER_H
-#define TIMER_H
+#pragma once
 
 #include <sys/time.h>
 
@@ -85,5 +84,3 @@ int osmo_timers_update(void);
 int osmo_timers_check(void);
 
 /*! @} */
-
-#endif
diff --git a/include/osmocom/core/timer_compat.h b/include/osmocom/core/timer_compat.h
index d86c109..fb2967b 100644
--- a/include/osmocom/core/timer_compat.h
+++ b/include/osmocom/core/timer_compat.h
@@ -26,8 +26,7 @@
  *  \brief Compatibility header with some helpers
  */
 
-#ifndef TIMER_COMPAT_H
-#define TIMER_COMPAT_H
+#pragma once
 
 
 /* Convenience macros for operations on timevals.
@@ -75,5 +74,3 @@
 
 
 /*! @} */
-
-#endif /* TIMER_COMPAT_H */
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index 2333de6..c08e775 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -1,5 +1,4 @@
-#ifndef OSMOCORE_UTIL_H
-#define OSMOCORE_UTIL_H
+#pragma once
 
 #include <osmocom/core/backtrace.h>
 
@@ -62,5 +61,3 @@ do {								\
 
 
 /*! @} */
-
-#endif
diff --git a/include/osmocom/core/write_queue.h b/include/osmocom/core/write_queue.h
index 816c036..4e0fdf3 100644
--- a/include/osmocom/core/write_queue.h
+++ b/include/osmocom/core/write_queue.h
@@ -20,8 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  */
-#ifndef OSMO_WQUEUE_H
-#define OSMO_WQUEUE_H
+#pragma once
 
 /*! \defgroup write_queue Osmocom msgb write queues
  *  @{
@@ -59,5 +58,3 @@ int osmo_wqueue_enqueue(struct osmo_wqueue *queue, struct msgb *data);
 int osmo_wqueue_bfd_cb(struct osmo_fd *fd, unsigned int what);
 
 /*! @} */
-
-#endif
diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h
index 871e7c8..bed48e7 100644
--- a/include/osmocom/crypt/auth.h
+++ b/include/osmocom/crypt/auth.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCRYPTO_AUTH_H
-#define _OSMOCRYPTO_AUTH_H
+#pragma once
 
 /*! \addtogroup auth
  *  @{
@@ -96,6 +95,4 @@ int osmo_auth_supported(enum osmo_auth_algo algo);
 const char *osmo_auth_alg_name(enum osmo_auth_algo alg);
 enum osmo_auth_algo osmo_auth_alg_parse(const char *name);
 
-#endif /* _OSMOCRYPTO_AUTH_H */
-
 /* @} */
diff --git a/include/osmocom/crypt/gprs_cipher.h b/include/osmocom/crypt/gprs_cipher.h
index 3051071..940b07b 100644
--- a/include/osmocom/crypt/gprs_cipher.h
+++ b/include/osmocom/crypt/gprs_cipher.h
@@ -1,5 +1,4 @@
-#ifndef _GPRS_CIPHER_H
-#define _GPRS_CIPHER_H
+#pragma once
 
 #include <osmocom/core/linuxlist.h>
 
@@ -50,5 +49,3 @@ uint32_t gprs_cipher_gen_input_ui(uint32_t iov_ui, uint8_t sapi, uint32_t lfn, u
 
 /* GSM TS 04.64 / Section A.2.1 : Generation of 'input' */
 uint32_t gprs_cipher_gen_input_i(uint32_t iov_i, uint32_t lfn, uint32_t oc);
-
-#endif /* _GPRS_CIPHER_H */
diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h
index eb4e721..f229253 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -1,5 +1,4 @@
-#ifndef _GPRS_BSSGP_H
-#define _GPRS_BSSGP_H
+#pragma once
 
 #include <stdint.h>
 #include <osmocom/core/timer.h>
@@ -207,5 +206,3 @@ int bssgp_vty_init(void);
 void bssgp_set_log_ss(int ss);
 
 int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx);
-
-#endif /* _GPRS_BSSGP_H */
diff --git a/include/osmocom/gprs/gprs_bssgp_bss.h b/include/osmocom/gprs/gprs_bssgp_bss.h
index f34281e..9e0cb66 100644
--- a/include/osmocom/gprs/gprs_bssgp_bss.h
+++ b/include/osmocom/gprs/gprs_bssgp_bss.h
@@ -1,5 +1,4 @@
-#ifndef _BSSGP_BSS_H
-#define _BSSGP_BSS_H
+#pragma once
 
 #include <osmocom/core/msgb.h>
 #include <osmocom/gprs/gprs_bssgp.h>
@@ -72,4 +71,3 @@ int bssgp_tx_fc_bvc(struct bssgp_bvc_ctx *bctx, uint8_t tag,
 int bssgp_tx_fc_ms(struct bssgp_bvc_ctx *bctx, uint32_t tlli, uint8_t tag,
 		   uint32_t ms_bucket_size, uint32_t bucket_leak_rate,
 		   uint8_t *bucket_full_ratio);
-#endif
diff --git a/include/osmocom/gprs/gprs_msgb.h b/include/osmocom/gprs/gprs_msgb.h
index e277696..06f5cca 100644
--- a/include/osmocom/gprs/gprs_msgb.h
+++ b/include/osmocom/gprs/gprs_msgb.h
@@ -1,5 +1,4 @@
-#ifndef _LIBGB_MSGB_H
-#define _LIBGB_MSGB_H
+#pragma once
 
 #include <stdint.h>
 /* the data structure stored in msgb->cb for libgb apps */
@@ -34,4 +33,3 @@ struct libgb_msgb_cb {
 #include <osmocom/core/logging.h>
 int gprs_log_filter_fn(const struct log_context *ctx,
 			struct log_target *tar);
-#endif
diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h
index 296800e..b4af61b 100644
--- a/include/osmocom/gprs/gprs_ns.h
+++ b/include/osmocom/gprs/gprs_ns.h
@@ -1,5 +1,4 @@
-#ifndef _GPRS_NS_H
-#define _GPRS_NS_H
+#pragma once
 
 #include <stdint.h>
 
@@ -215,5 +214,3 @@ struct ns_signal_data {
 void gprs_ns_set_log_ss(int ss);
 
 /*! }@ */
-
-#endif
diff --git a/include/osmocom/gprs/gprs_ns_frgre.h b/include/osmocom/gprs/gprs_ns_frgre.h
index abcd43f..72ef7d1 100644
--- a/include/osmocom/gprs/gprs_ns_frgre.h
+++ b/include/osmocom/gprs/gprs_ns_frgre.h
@@ -1,6 +1,3 @@
-#ifndef _GPRS_NS_FRGRE_H
-#define _GPRS_NS_FRGRE_H
+#pragma once
 
 int gprs_ns_frgre_sendmsg(struct gprs_nsvc *nsvc, struct msgb *msg);
-
-#endif
diff --git a/include/osmocom/gprs/protocol/gsm_08_16.h b/include/osmocom/gprs/protocol/gsm_08_16.h
index 4c3eda3..8b2ac56 100644
--- a/include/osmocom/gprs/protocol/gsm_08_16.h
+++ b/include/osmocom/gprs/protocol/gsm_08_16.h
@@ -1,5 +1,4 @@
-#ifndef _OSMO_08_16_H
-#define _OSMO_08_16_H
+#pragma once
 
 /* GPRS Networks Service (NS) messages on the Gb interface
  * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05)
@@ -81,5 +80,3 @@ enum ns_cause {
 	NS_CAUSE_UNKN_IP_ADDR		= 0x13,
 	NS_CAUSE_UNKN_IP_TEST_FAILED	= 0x14,
 };
-
-#endif
diff --git a/include/osmocom/gprs/protocol/gsm_08_18.h b/include/osmocom/gprs/protocol/gsm_08_18.h
index 3a351ea..529e988 100644
--- a/include/osmocom/gprs/protocol/gsm_08_18.h
+++ b/include/osmocom/gprs/protocol/gsm_08_18.h
@@ -1,5 +1,4 @@
-#ifndef _OSMO_08_18_H
-#define _OSMO_08_18_H
+#pragma once
 
 #include <stdint.h>
 
@@ -140,5 +139,3 @@ enum gprs_bssgp_cause {
 	BSSGP_CAUSE_PROTO_ERR_UNSPEC	= 0x27,
 	BSSGP_CAUSE_PDU_INCOMP_FEAT	= 0x28,
 };
-
-#endif
diff --git a/include/osmocom/gsm/a5.h b/include/osmocom/gsm/a5.h
index 2f78a92..c076734 100644
--- a/include/osmocom/gsm/a5.h
+++ b/include/osmocom/gsm/a5.h
@@ -20,8 +20,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __OSMO_A5_H__
-#define __OSMO_A5_H__
+#pragma once
 
 #include <stdint.h>
 
@@ -59,5 +58,3 @@ void osmo_a5_1(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
 void osmo_a5_2(const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul);
 
 /*! @} */
-
-#endif /* __OSMO_A5_H__ */
diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h
index 86b97eb..bc13ffe 100644
--- a/include/osmocom/gsm/abis_nm.h
+++ b/include/osmocom/gsm/abis_nm.h
@@ -1,5 +1,4 @@
-#ifndef _OSMO_GSM_ABIS_NM_H
-#define _OSMO_GSM_ABIS_NM_H
+#pragma once
 
 /*! \defgroup oml A-bis OML
  *  @{
@@ -47,5 +46,3 @@ int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan);
 enum gsm_phys_chan_config abis_nm_pchan4chcomb(uint8_t chcomb);
 
 /*! @} */
-
-#endif /* _OSMO_GSM_ABIS_NM_H */
diff --git a/include/osmocom/gsm/comp128.h b/include/osmocom/gsm/comp128.h
index e4587d4..33b997a 100644
--- a/include/osmocom/gsm/comp128.h
+++ b/include/osmocom/gsm/comp128.h
@@ -4,8 +4,7 @@
  * See comp128.c for details
  */
 
-#ifndef __COMP128_H__
-#define __COMP128_H__
+#pragma once
 
 #include <stdint.h>
 
@@ -17,6 +16,3 @@
  * kc    : uint8_t [8]
  */
 void comp128(const uint8_t *ki, const uint8_t *srand, uint8_t *sres, uint8_t *kc);
-
-#endif /* __COMP128_H__ */
-
diff --git a/include/osmocom/gsm/comp128v23.h b/include/osmocom/gsm/comp128v23.h
index bebeb59..31d3933 100644
--- a/include/osmocom/gsm/comp128v23.h
+++ b/include/osmocom/gsm/comp128v23.h
@@ -4,8 +4,7 @@
  * See comp128v23.c for details
  */
 
-#ifndef __COMP128V23_H__
-#define __COMP128V23_H__
+#pragma once
 
 #include <stdint.h>
 
@@ -19,5 +18,3 @@
  */
 int comp128v2(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc);
 int comp128v3(const uint8_t *ki, const uint8_t *rand, uint8_t *sres, uint8_t *kc);
-
-#endif /* __COMP128V23_H__ */
diff --git a/include/osmocom/gsm/gan.h b/include/osmocom/gsm/gan.h
index ab4c1e4..6f2b535 100644
--- a/include/osmocom/gsm/gan.h
+++ b/include/osmocom/gsm/gan.h
@@ -1,9 +1,6 @@
-#ifndef _OSMO_GSM_GAN_H
-#define  _OSMO_GSM_GAN_H
+#pragma once
 
 #include <osmocom/core/utils.h>
 
 extern const struct value_string gan_msgt_vals[];
 static const struct value_string gan_pdisc_vals[];
-
-#endif
diff --git a/include/osmocom/gsm/gsm0411_smc.h b/include/osmocom/gsm/gsm0411_smc.h
index 239ee13..89964fa 100644
--- a/include/osmocom/gsm/gsm0411_smc.h
+++ b/include/osmocom/gsm/gsm0411_smc.h
@@ -1,5 +1,4 @@
-#ifndef _GSM0411_SMC_H
-#define _GSM0411_SMC_H
+#pragma once
 
 #include <osmocom/core/timer.h>
 #include <osmocom/gsm/protocol/gsm_04_11.h>
@@ -60,5 +59,3 @@ int gsm411_smc_send(struct gsm411_smc_inst *inst, int msg_type,
 /* message from lower layer */
 int gsm411_smc_recv(struct gsm411_smc_inst *inst, int msg_type,
 	struct msgb *msg, int cp_msg_type);
-
-#endif /* _GSM0411_SMC_H */
diff --git a/include/osmocom/gsm/gsm0411_smr.h b/include/osmocom/gsm/gsm0411_smr.h
index b061492..bc908a7 100644
--- a/include/osmocom/gsm/gsm0411_smr.h
+++ b/include/osmocom/gsm/gsm0411_smr.h
@@ -1,5 +1,4 @@
-#ifndef _GSM0411_SMR_H
-#define _GSM0411_SMR_H
+#pragma once
 
 #include <osmocom/gsm/protocol/gsm_04_11.h>
 
@@ -41,6 +40,3 @@ int gsm411_smr_send(struct gsm411_smr_inst *inst, int msg_type,
 /* message from lower layer */
 int gsm411_smr_recv(struct gsm411_smr_inst *inst, int msg_type,
 	struct msgb *msg);
-
-#endif /* _GSM0411_SMR_H */
-
diff --git a/include/osmocom/gsm/gsm0411_utils.h b/include/osmocom/gsm/gsm0411_utils.h
index ad368e6..7005010 100644
--- a/include/osmocom/gsm/gsm0411_utils.h
+++ b/include/osmocom/gsm/gsm0411_utils.h
@@ -1,5 +1,4 @@
-#ifndef _GSM0411_UTILS_H
-#define _GSM0411_UTILS_H
+#pragma once
 
 #include <time.h>
 
@@ -34,5 +33,3 @@ int gsm411_push_rp_header(struct msgb *msg, uint8_t rp_msg_type,
 /* Prefix msg with a 04.08/04.11 CP header */
 int gsm411_push_cp_header(struct msgb *msg, uint8_t proto, uint8_t trans,
 			     uint8_t msg_type);
-
-#endif /* _GSM0411_UTILS_H */
diff --git a/include/osmocom/gsm/gsm0480.h b/include/osmocom/gsm/gsm0480.h
index d6626d6..b128162 100644
--- a/include/osmocom/gsm/gsm0480.h
+++ b/include/osmocom/gsm/gsm0480.h
@@ -1,5 +1,4 @@
-#ifndef gsm0480_h
-#define gsm0480_h
+#pragma once
 
 #include <osmocom/core/msgb.h>
 #include <osmocom/gsm/protocol/gsm_04_08.h>
@@ -22,5 +21,3 @@ struct msgb *gsm0480_create_notifySS(const char *text);
 
 int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id);
 int gsm0480_wrap_facility(struct msgb *msg);
-
-#endif
diff --git a/include/osmocom/gsm/gsm0502.h b/include/osmocom/gsm/gsm0502.h
index 46b629e..6ee5a60 100644
--- a/include/osmocom/gsm/gsm0502.h
+++ b/include/osmocom/gsm/gsm0502.h
@@ -1,5 +1,4 @@
-#ifndef OSMOCOM_GSM_0502_H
-#define OSMOCOM_GSM_0502_H
+#pragma once
 
 #include <stdint.h>
 
@@ -34,5 +33,3 @@ gsm0502_get_paging_group(uint64_t imsi, unsigned int bs_cc_chans,
 
 unsigned int
 gsm0502_calc_paging_group(struct gsm48_control_channel_descr *chan_desc, uint64_t imsi);
-
-#endif
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index 5127c00..a7e102c 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -17,8 +17,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  */
-#ifndef OSMOCORE_GSM0808_H
-#define OSMOCORE_GSM0808_H
+#pragma once
 
 #include "tlv.h"
 
@@ -47,5 +46,3 @@ const struct tlv_definition *gsm0808_att_tlvdef(void);
 
 const char *gsm0808_bssmap_name(uint8_t msg_type);
 const char *gsm0808_bssap_name(uint8_t msg_type);
-
-#endif
diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h
index 1e7498a..151b14e 100644
--- a/include/osmocom/gsm/gsm48.h
+++ b/include/osmocom/gsm/gsm48.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCORE_GSM48_H
-#define _OSMOCORE_GSM48_H
+#pragma once
 
 #include <osmocom/gsm/tlv.h>
 #include <osmocom/gsm/protocol/gsm_04_08.h>
@@ -36,5 +35,3 @@ void gsm48_parse_ra(struct gprs_ra_id *raid, const uint8_t *buf);
 int gsm48_construct_ra(uint8_t *buf, const struct gprs_ra_id *raid);
 
 int gsm48_number_of_paging_subchannels(struct gsm48_control_channel_descr *chan_desc);
-
-#endif
diff --git a/include/osmocom/gsm/gsm48_ie.h b/include/osmocom/gsm/gsm48_ie.h
index f4fce25..8445486 100644
--- a/include/osmocom/gsm/gsm48_ie.h
+++ b/include/osmocom/gsm/gsm48_ie.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCORE_GSM48_IE_H
-#define _OSMOCORE_GSM48_IE_H
+#pragma once
 
 #include <stdint.h>
 #include <string.h>
@@ -113,5 +112,3 @@ struct gsm_sysinfo_freq {
 /* decode "Cell Channel Description" (10.5.2.1b) and other frequency lists */
 int gsm48_decode_freq_list(struct gsm_sysinfo_freq *f, uint8_t *cd,
 			   uint8_t len, uint8_t mask, uint8_t frqt);
-
-#endif
diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index 02bfe4c..6eab7ac 100644
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -22,8 +22,7 @@
  *
  */
 
-#ifndef GSM_UTILS_H
-#define GSM_UTILS_H
+#pragma once
 
 #include <stddef.h>
 #include <stdint.h>
@@ -203,6 +202,3 @@ int gsm_7bit_decode_ussd(char *decoded, const uint8_t *user_data, uint8_t length
 int gsm_7bit_encode(uint8_t *result, const char *data) OSMO_DEPRECATED("Use gsm_7bit_encode_n() instead");
 int gsm_7bit_encode_ussd(uint8_t *result, const char *data, int *octets_written) OSMO_DEPRECATED("Use gsm_7bit_encode_n_ussd() instead");
 int gsm_7bit_encode_oct(uint8_t *result, const char *data, int *octets_written) OSMO_DEPRECATED("Use gsm_7bit_encode_n() instead");
-
-
-#endif
diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h
index c21abe5..9f3fe98 100644
--- a/include/osmocom/gsm/l1sap.h
+++ b/include/osmocom/gsm/l1sap.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCOM_L1SAP_H
-#define _OSMOCOM_L1SAP_H
+#pragma once
 
 #include <osmocom/core/prim.h>
 
@@ -121,5 +120,3 @@ struct osmo_phsap_prim {
 		struct mph_info_param info;
 	} u;			/*!< \brief request-specific data */
 };
-
-#endif /* _OSMOCOM_L1SAP_H */
diff --git a/include/osmocom/gsm/lapd_core.h b/include/osmocom/gsm/lapd_core.h
index f88fb11..42ef417 100644
--- a/include/osmocom/gsm/lapd_core.h
+++ b/include/osmocom/gsm/lapd_core.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCOM_LAPD_H
-#define _OSMOCOM_LAPD_H
+#pragma once
 
 #include <stdint.h>
 
@@ -170,5 +169,3 @@ int lapd_ph_data_ind(struct msgb *msg, struct lapd_msg_ctx *lctx);
 int lapd_recv_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx);
 
 /*! @} */
-
-#endif /* _OSMOCOM_LAPD_H */
diff --git a/include/osmocom/gsm/lapdm.h b/include/osmocom/gsm/lapdm.h
index 9393406..84d109d 100644
--- a/include/osmocom/gsm/lapdm.h
+++ b/include/osmocom/gsm/lapdm.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCOM_LAPDM_H
-#define _OSMOCOM_LAPDM_H
+#pragma once
 
 #include <osmocom/gsm/l1sap.h>
 #include <osmocom/gsm/lapd_core.h>
@@ -112,5 +111,3 @@ void lapdm_channel_set_flags(struct lapdm_channel *lc, unsigned int flags);
 int lapdm_phsap_dequeue_prim(struct lapdm_entity *le, struct osmo_phsap_prim *pp);
 
 /*! @} */
-
-#endif /* _OSMOCOM_LAPDM_H */
diff --git a/include/osmocom/gsm/meas_rep.h b/include/osmocom/gsm/meas_rep.h
index bd24bbe..09c2c4f 100644
--- a/include/osmocom/gsm/meas_rep.h
+++ b/include/osmocom/gsm/meas_rep.h
@@ -1,5 +1,4 @@
-#ifndef _OSMO_MEAS_REP_H
-#define _OSMO_MEAS_REP_H
+#pragma once
 
 #include <stdint.h>
 
@@ -25,5 +24,3 @@ enum meas_rep_field {
 	MEAS_REP_UL_RXQUAL_FULL,
 	MEAS_REP_UL_RXQUAL_SUB,
 };
-
-#endif
diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index a51267e..171db7a 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCORE_MNCC_H
-#define _OSMOCORE_MNCC_H
+#pragma once
 
 #include <osmocom/gsm/protocol/gsm_04_08.h>
 
@@ -81,5 +80,3 @@ enum {
 	GSM_MNCC_BCAP_OTHER_ITC = 5,
 	GSM_MNCC_BCAP_RESERVED	= 7,
 };
-
-#endif
diff --git a/include/osmocom/gsm/prim.h b/include/osmocom/gsm/prim.h
index 5beb200..5f61dc7 100644
--- a/include/osmocom/gsm/prim.h
+++ b/include/osmocom/gsm/prim.h
@@ -1,5 +1,4 @@
-#ifndef OSMO_GSM_PRIM_H
-#define OSMO_GSM_PRIM_H
+#pragma once
 
 #include <osmocom/core/prim.h>
 
@@ -14,5 +13,3 @@ enum osmo_gsm_sap {
 	SAP_BSSGP_NM,
 	SAP_BSSGP_PFM,
 };
-
-#endif
diff --git a/include/osmocom/gsm/protocol/gsm_03_41.h b/include/osmocom/gsm/protocol/gsm_03_41.h
index 54365cb..b6efb5e 100644
--- a/include/osmocom/gsm/protocol/gsm_03_41.h
+++ b/include/osmocom/gsm/protocol/gsm_03_41.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_03_41_H
-#define PROTO_GSM_03_41_H
+#pragma once
 
 #include <stdint.h>
 
@@ -47,5 +46,3 @@ struct gsm341_etws_message {
 #define GSM341_GS_PLMN_WIDE		1
 #define GSM341_GS_LA_WIDE		2
 #define GSM341_GS_CELL_WIDE		3
-
-#endif /* PROTO_GSM_03_41_H */
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index 8fa5d9a..9fcdddc 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_04_08_H
-#define PROTO_GSM_04_08_H
+#pragma once
 
 #include <stdint.h>
 
@@ -1336,5 +1335,3 @@ struct gsm48_ra_id {
 
 #define GSM_MACBLOCK_LEN	23
 #define GSM_MACBLOCK_PADDING	0x2b
-
-#endif /* PROTO_GSM_04_08_H */
diff --git a/include/osmocom/gsm/protocol/gsm_04_11.h b/include/osmocom/gsm/protocol/gsm_04_11.h
index 38dd553..651adca 100644
--- a/include/osmocom/gsm/protocol/gsm_04_11.h
+++ b/include/osmocom/gsm/protocol/gsm_04_11.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_04_11_H
-#define PROTO_GSM_04_11_H
+#pragma once
 
 #include <stdint.h>
 
@@ -186,5 +185,3 @@ enum sms_alphabet {
 #define GSM338_DCS_1111_CLASS1_ME	1
 #define GSM338_DCS_1111_CLASS2_SIM	2
 #define GSM338_DCS_1111_CLASS3_TE	3	/* See TS 07.05 */
-
-#endif /* PROTO_GSM_04_11_H */
diff --git a/include/osmocom/gsm/protocol/gsm_04_12.h b/include/osmocom/gsm/protocol/gsm_04_12.h
index 9b1538a..aa40648 100644
--- a/include/osmocom/gsm/protocol/gsm_04_12.h
+++ b/include/osmocom/gsm/protocol/gsm_04_12.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_04_12_H
-#define PROTO_GSM_04_12_H
+#pragma once
 
 #include <stdint.h>
 
@@ -27,5 +26,3 @@ struct gsm412_sched_msg {
 	uint8_t cbsms_msg_map[6];
 	uint8_t data[0];
 } __attribute__((packed));
-
-#endif
diff --git a/include/osmocom/gsm/protocol/gsm_04_80.h b/include/osmocom/gsm/protocol/gsm_04_80.h
index fa5c945..2aebb46 100644
--- a/include/osmocom/gsm/protocol/gsm_04_80.h
+++ b/include/osmocom/gsm/protocol/gsm_04_80.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_04_80_H
-#define PROTO_GSM_04_80_H
+#pragma once
 
 /* GSM TS 04.80  definitions (Supplementary Services Specification, Formats and Coding) */
 
@@ -122,5 +121,3 @@
 #define ASN1_PRINTABLE_STRING_TAG	0x13
 #define ASN1_IA5_STRING_TAG		0x16
 #define ASN1_UNICODE_STRING_TAG		0x1E
-
-#endif /* PROTO_GSM_04_80_H */
diff --git a/include/osmocom/gsm/protocol/gsm_08_08.h b/include/osmocom/gsm/protocol/gsm_08_08.h
index 6b8f935..bf408eb 100644
--- a/include/osmocom/gsm/protocol/gsm_08_08.h
+++ b/include/osmocom/gsm/protocol/gsm_08_08.h
@@ -1,7 +1,6 @@
 /* From GSM08.08 */
 
-#ifndef GSM_0808_H
-#define GSM_0808_H
+#pragma once
 
 #include <stdlib.h>
 
@@ -299,5 +298,3 @@ enum gsm0808_permitted_speech {
 	GSM0808_PERM_HR2	= GSM0808_PERM_FR2 | 0x4,
 	GSM0808_PERM_HR3	= GSM0808_PERM_FR3 | 0x4,
 };
-
-#endif
diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h
index 89aafb8..3f01a92 100644
--- a/include/osmocom/gsm/protocol/gsm_08_58.h
+++ b/include/osmocom/gsm/protocol/gsm_08_58.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_08_58_H
-#define PROTO_GSM_08_58_H
+#pragma once
 
 /* GSM Radio Signalling Link messages on the A-bis interface 
  * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */
@@ -579,5 +578,3 @@ enum rsl_rel_mode {
 };
 
 /*! @} */
-
-#endif /* PROTO_GSM_08_58_H */
diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h
index ad0890c..4e8e72b 100644
--- a/include/osmocom/gsm/protocol/gsm_12_21.h
+++ b/include/osmocom/gsm/protocol/gsm_12_21.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_12_21_H
-#define PROTO_GSM_12_21_H
+#pragma once
 
 /* GSM Network Management messages on the A-bis interface 
  * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
@@ -748,5 +747,3 @@ enum ipac_bcch_info_type {
 };
 
 /*! @} */
-
-#endif /* PROTO_GSM_12_21_H */
diff --git a/include/osmocom/gsm/protocol/gsm_44_318.h b/include/osmocom/gsm/protocol/gsm_44_318.h
index cd5ec05..5d7f878 100644
--- a/include/osmocom/gsm/protocol/gsm_44_318.h
+++ b/include/osmocom/gsm/protocol/gsm_44_318.h
@@ -1,5 +1,4 @@
-#ifndef PROTO_GSM_44_318_H
-#define PROTO_GSM_44_318_H
+#pragma once
 
 #include <stdint.h>
 
@@ -197,4 +196,3 @@ struct gan_cch_desc_ie {
 #endif
 	uint8_t access_class[2];
 } __attribute__((packed));
-#endif /* PROTO_GSM_44_318_H */
diff --git a/include/osmocom/gsm/protocol/ipaccess.h b/include/osmocom/gsm/protocol/ipaccess.h
index 5d98a21..254c2bc 100644
--- a/include/osmocom/gsm/protocol/ipaccess.h
+++ b/include/osmocom/gsm/protocol/ipaccess.h
@@ -1,5 +1,4 @@
-#ifndef _OSMO_PROTO_IPACCESS_H
-#define _OSMO_PROTO_IPACCESS_H
+#pragma once
 
 #include <stdint.h>
 
@@ -90,5 +89,3 @@ struct sdp_header_entry {
 	uint32_t addr2;
 	uint32_t start;
 } __attribute__((packed));
-
-#endif /* _OSMO_PROTO_IPACCESS_H */
diff --git a/include/osmocom/gsm/protocol/smpp34_osmocom.h b/include/osmocom/gsm/protocol/smpp34_osmocom.h
index 20e9206..cff6adb 100644
--- a/include/osmocom/gsm/protocol/smpp34_osmocom.h
+++ b/include/osmocom/gsm/protocol/smpp34_osmocom.h
@@ -1,5 +1,4 @@
-#ifndef _SMPP34_OSMOCOM_H
-#define _SMPP34_OSMOCOM_H
+#pragma once
 /* Osmocom SMPP extensions */
 
 /* Osmocom specific new TLV definitions */
@@ -44,5 +43,3 @@
  * 	TLVID_osmo_rxqual_dl
  * 	TLVID_osmo_imei
  */
-
-#endif
diff --git a/include/osmocom/gsm/rsl.h b/include/osmocom/gsm/rsl.h
index b8e4157..753dd19 100644
--- a/include/osmocom/gsm/rsl.h
+++ b/include/osmocom/gsm/rsl.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCORE_RSL_H
-#define _OSMOCORE_RSL_H
+#pragma once
 
 #include <stdint.h>
 #include <osmocom/core/utils.h>
@@ -51,5 +50,3 @@ struct msgb *rsl_rll_simple(uint8_t msg_type, uint8_t chan_nr,
 			    uint8_t link_id, int transparent);
 
 /*! @} */
-
-#endif /* _OSMOCORE_RSL_H */
diff --git a/include/osmocom/gsm/rxlev_stat.h b/include/osmocom/gsm/rxlev_stat.h
index 415509d..7183b17 100644
--- a/include/osmocom/gsm/rxlev_stat.h
+++ b/include/osmocom/gsm/rxlev_stat.h
@@ -1,5 +1,4 @@
-#ifndef _OSMOCORE_RXLEV_STATS_H
-#define _OSMOCORE_RXLEV_STATS_H
+#pragma once
 
 #define NUM_RXLEVS 32
 #define NUM_ARFCNS 1024
@@ -18,5 +17,3 @@ int16_t rxlev_stat_get_next(const struct rxlev_stats *st, uint8_t rxlev, int16_t
 void rxlev_stat_reset(struct rxlev_stats *st);
 
 void rxlev_stat_dump(const struct rxlev_stats *st);
-
-#endif /* _OSMOCORE_RXLEV_STATS_H */
diff --git a/include/osmocom/gsm/sysinfo.h b/include/osmocom/gsm/sysinfo.h
index 06feb1d..7d1fe2b 100644
--- a/include/osmocom/gsm/sysinfo.h
+++ b/include/osmocom/gsm/sysinfo.h
@@ -1,5 +1,4 @@
-#ifndef _OSMO_GSM_SYSINFO_H
-#define _OSMO_GSM_SYSINFO_H
+#pragma once
 
 #include <osmocom/core/utils.h>
 #include <osmocom/gsm/protocol/gsm_04_08.h>
@@ -39,5 +38,3 @@ extern const struct value_string osmo_sitype_strs[_MAX_SYSINFO_TYPE];
 
 uint8_t osmo_sitype2rsl(enum osmo_sysinfo_type si_type);
 enum osmo_sysinfo_type osmo_rsl2sitype(uint8_t rsl_si);
-
-#endif /* _OSMO_GSM_SYSINFO_H */
diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h
index a70b0f9..fda1810 100644
--- a/include/osmocom/gsm/tlv.h
+++ b/include/osmocom/gsm/tlv.h
@@ -1,5 +1,4 @@
-#ifndef _TLV_H
-#define _TLV_H
+#pragma once
 
 #include <stdint.h>
 #include <string.h>
@@ -435,5 +434,3 @@ static inline uint32_t tlvp_val32_unal(const struct tlv_parsed *tp, int pos)
 }
 
 /*! @} */
-
-#endif /* _TLV_H */
diff --git a/include/osmocom/vty/buffer.h b/include/osmocom/vty/buffer.h
index c9467a9..482a919 100644
--- a/include/osmocom/vty/buffer.h
+++ b/include/osmocom/vty/buffer.h
@@ -20,8 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef _ZEBRA_BUFFER_H
-#define _ZEBRA_BUFFER_H
+#pragma once
 
 #include <sys/types.h>
 
@@ -98,5 +97,3 @@ extern buffer_status_t buffer_flush_all(struct buffer *, int fd);
 */
 extern buffer_status_t buffer_flush_window(struct buffer *, int fd, int width,
 					   int height, int erase, int no_more);
-
-#endif				/* _ZEBRA_BUFFER_H */
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index b3b3029..3acbe78 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -20,8 +20,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef _ZEBRA_COMMAND_H
-#define _ZEBRA_COMMAND_H
+#pragma once
 
 #include <stdio.h>
 #include <sys/types.h>
@@ -376,4 +375,3 @@ void print_version(int print_copyright);
 extern void *tall_vty_cmd_ctx;
 
 /*! @} */
-#endif				/* _ZEBRA_COMMAND_H */
diff --git a/include/osmocom/vty/logging.h b/include/osmocom/vty/logging.h
index e0011bf..9e4b98f 100644
--- a/include/osmocom/vty/logging.h
+++ b/include/osmocom/vty/logging.h
@@ -1,5 +1,4 @@
-#ifndef _VTY_LOGGING_H
-#define _VTY_LOGGING_H
+#pragma once
 
 #define LOGGING_STR	"Configure log message to this terminal\n"
 #define FILTER_STR	"Filter log messages\n"
@@ -8,5 +7,3 @@ struct log_info;
 void logging_vty_add_cmds(const struct log_info *cat);
 struct vty;
 struct log_target *osmo_log_vty2tgt(struct vty *vty);
-
-#endif /* _VTY_LOGGING_H */
diff --git a/include/osmocom/vty/misc.h b/include/osmocom/vty/misc.h
index db4f4a7..db552e7 100644
--- a/include/osmocom/vty/misc.h
+++ b/include/osmocom/vty/misc.h
@@ -1,5 +1,4 @@
-#ifndef OSMO_VTY_MISC_H
-#define OSMO_VTY_MISC_H
+#pragma once
 
 #include <osmocom/vty/vty.h>
 #include <osmocom/core/rate_ctr.h>
@@ -15,5 +14,3 @@ void vty_out_rate_ctr_group(struct vty *vty, const char *prefix,
 
 int osmo_vty_write_config_file(const char *filename);
 int osmo_vty_save_config_file(void);
-
-#endif
diff --git a/include/osmocom/vty/telnet_interface.h b/include/osmocom/vty/telnet_interface.h
index 3c22201..e939ec7 100644
--- a/include/osmocom/vty/telnet_interface.h
+++ b/include/osmocom/vty/telnet_interface.h
@@ -18,8 +18,7 @@
  *
  */
 
-#ifndef TELNET_INTERFACE_H
-#define TELNET_INTERFACE_H
+#pragma once
 
 #include <osmocom/core/logging.h>
 #include <osmocom/core/select.h>
@@ -52,5 +51,3 @@ int telnet_init_dynif(void *tall_ctx, void *priv, const char *ip, int port);
 void telnet_exit(void);
 
 /*! @} */
-
-#endif /* TELNET_INTERFACE_H */
diff --git a/include/osmocom/vty/vector.h b/include/osmocom/vty/vector.h
index 22a184d..7caa5ff 100644
--- a/include/osmocom/vty/vector.h
+++ b/include/osmocom/vty/vector.h
@@ -20,8 +20,7 @@
  * 02111-1307, USA.
  */
 
-#ifndef _ZEBRA_VECTOR_H
-#define _ZEBRA_VECTOR_H
+#pragma once
 
 /* struct for vector */
 struct _vector {
@@ -60,5 +59,3 @@ void *vector_lookup(vector, unsigned int);
 void *vector_lookup_ensure(vector, unsigned int);
 
 extern void *tall_vty_vec_ctx;
-
-#endif				/* _ZEBRA_VECTOR_H */
diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h
index ea987bf..ea02e4a 100644
--- a/include/osmocom/vty/vty.h
+++ b/include/osmocom/vty/vty.h
@@ -1,5 +1,4 @@
-#ifndef _VTY_H
-#define _VTY_H
+#pragma once
 
 #include <stdio.h>
 #include <stdarg.h>
@@ -205,5 +204,3 @@ struct vty_signal_data {
 };
 
 /*! @} */
-
-#endif
diff --git a/src/gsm/milenage/aes.h b/src/gsm/milenage/aes.h
index ba384a9..7e97f61 100644
--- a/src/gsm/milenage/aes.h
+++ b/src/gsm/milenage/aes.h
@@ -12,8 +12,7 @@
  * See README and COPYING for more details.
  */
 
-#ifndef AES_H
-#define AES_H
+#pragma once
 
 #define AES_BLOCK_SIZE 16
 
@@ -23,5 +22,3 @@ void aes_encrypt_deinit(void *ctx);
 void * aes_decrypt_init(const u8 *key, size_t len);
 void aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
 void aes_decrypt_deinit(void *ctx);
-
-#endif /* AES_H */
diff --git a/src/gsm/milenage/aes_i.h b/src/gsm/milenage/aes_i.h
index 6b40bc7..c831757 100644
--- a/src/gsm/milenage/aes_i.h
+++ b/src/gsm/milenage/aes_i.h
@@ -12,8 +12,7 @@
  * See README and COPYING for more details.
  */
 
-#ifndef AES_I_H
-#define AES_I_H
+#pragma once
 
 #include "aes.h"
 
@@ -118,5 +117,3 @@ static inline u32 rotr(u32 val, int bits)
 #define AES_PRIV_SIZE (4 * 44)
 
 void rijndaelKeySetupEnc(u32 rk[/*44*/], const u8 cipherKey[]);
-
-#endif /* AES_I_H */
diff --git a/src/gsm/milenage/aes_wrap.h b/src/gsm/milenage/aes_wrap.h
index 4b1c7b0..afa1451 100644
--- a/src/gsm/milenage/aes_wrap.h
+++ b/src/gsm/milenage/aes_wrap.h
@@ -19,8 +19,7 @@
  * See README and COPYING for more details.
  */
 
-#ifndef AES_WRAP_H
-#define AES_WRAP_H
+#pragma once
 
 int __must_check aes_wrap(const u8 *kek, int n, const u8 *plain, u8 *cipher);
 int __must_check aes_unwrap(const u8 *kek, int n, const u8 *cipher, u8 *plain);
@@ -44,5 +43,3 @@ int __must_check aes_128_cbc_encrypt(const u8 *key, const u8 *iv, u8 *data,
 				     size_t data_len);
 int __must_check aes_128_cbc_decrypt(const u8 *key, const u8 *iv, u8 *data,
 				     size_t data_len);
-
-#endif /* AES_WRAP_H */
diff --git a/src/gsm/milenage/milenage.h b/src/gsm/milenage/milenage.h
index a91e946..6fb779c 100644
--- a/src/gsm/milenage/milenage.h
+++ b/src/gsm/milenage/milenage.h
@@ -12,8 +12,7 @@
  * See README and COPYING for more details.
  */
 
-#ifndef MILENAGE_H
-#define MILENAGE_H
+#pragma once
 
 void milenage_generate(const u8 *opc, const u8 *amf, const u8 *k,
 		       const u8 *sqn, const u8 *_rand, u8 *autn, u8 *ik,
@@ -31,5 +30,3 @@ int milenage_f2345(const u8 *opc, const u8 *k, const u8 *_rand,
 		   u8 *res, u8 *ck, u8 *ik, u8 *ak, u8 *akstar);
 
 int milenage_opc_gen(u8 *opc, const u8 *k, const u8 *op);
-
-#endif /* MILENAGE_H */
-- 
1.8.3.2





More information about the baseband-devel mailing list