From f471afd8963ca1a5b914db0cbb3471db087f44b8 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Sun, 19 Jan 2014 16:30:17 +0000 Subject: [PATCH] replaced #pragma once with old style #include guards to allow use of older compilers --- CocoaTouch/include/BTstack/BTstackManager.h | 5 ++++- MSP-EXP430F5438-CC256x/firmware/hal_compat.h | 4 +++- MSP-EXP430F5438-CC256x/firmware/hal_lcd_fonts.h | 5 ++++- MSP-EXP430F5438-CC256x/firmware/hal_util.h | 4 +++- Ports/uCOS/btstack/src/run_loop_ucos.h | 5 ++++- SpringBoardAccess/SpringBoardAccess.h | 5 ++++- ble/att.h | 5 ++++- ble/att_server.h | 5 ++++- ble/central_device_db.h | 5 ++++- ble/gap_le.h | 4 +++- ble/sm.h | 5 ++++- chipset-cc256x/bt_control_cc256x.h | 6 ++++-- eZ430-RF2560/firmware/hal_compat.h | 4 +++- eZ430-RF2560/firmware/hal_util.h | 4 +++- example/libusb/ad_parser.h | 6 ++++-- example/libusb/ble_client.h | 6 ++++-- include/btstack/ant_cmds.h | 5 ++++- include/btstack/btstack.h | 5 ++++- include/btstack/hal_cpu.h | 5 +++-- include/btstack/hal_tick.h | 6 ++++-- include/btstack/hal_uart_dma.h | 6 ++++-- include/btstack/hci_cmds.h | 5 ++++- include/btstack/linked_list.h | 5 ++++- include/btstack/memory_pool.h | 5 ++++- include/btstack/run_loop.h | 4 +++- include/btstack/sdp_util.h | 5 ++++- include/btstack/utils.h | 4 +++- src/bt_control.h | 5 ++++- src/bt_control_iphone.h | 4 +++- src/btstack_memory.h | 5 ++++- src/debug.h | 5 ++++- src/gap.h | 4 +++- src/hci.h | 5 ++++- src/hci_dump.h | 6 ++++-- src/hci_transport.h | 4 +++- src/l2cap.h | 5 ++++- src/l2cap_signaling.h | 4 +++- src/platform_iphone.h | 5 ++++- src/remote_device_db.h | 5 ++++- src/rfcomm.h | 5 ++++- src/run_loop_private.h | 4 +++- src/sdp.h | 6 ++++-- src/sdp_client.h | 5 ++++- src/sdp_parser.h | 4 +++- src/sdp_query_rfcomm.h | 5 ++++- src/sdp_query_util.h | 5 ++++- src/socket_connection.h | 5 ++++- test/sdp_client/config.h | 5 ++++- 48 files changed, 178 insertions(+), 56 deletions(-) diff --git a/CocoaTouch/include/BTstack/BTstackManager.h b/CocoaTouch/include/BTstack/BTstackManager.h index 82e9fbb63..ec7ae3fe3 100644 --- a/CocoaTouch/include/BTstack/BTstackManager.h +++ b/CocoaTouch/include/BTstack/BTstackManager.h @@ -29,7 +29,8 @@ * */ -#pragma once +#ifndef __BTSTACKMANAGER_H +#define __BTSTACKMANAGER_H #import #import @@ -186,3 +187,5 @@ typedef enum { // TODO add l2cap and rfcomm incoming events @end + +#endif // __BTSTACKMANAGER_H diff --git a/MSP-EXP430F5438-CC256x/firmware/hal_compat.h b/MSP-EXP430F5438-CC256x/firmware/hal_compat.h index ca508f451..a90450eb1 100644 --- a/MSP-EXP430F5438-CC256x/firmware/hal_compat.h +++ b/MSP-EXP430F5438-CC256x/firmware/hal_compat.h @@ -7,7 +7,8 @@ // mspgcc LTS doesn't support 20-bit pointer yet -> put const data into .fartext -#pragma once +#ifndef __HAL_COMPAT_H +#define __HAL_COMPAT_H #include @@ -21,3 +22,4 @@ void FlashReadBlock(uint8_t *buffer, uint32_t addr, uint16_t len); +#endif // __HAL_COMPAT_H diff --git a/MSP-EXP430F5438-CC256x/firmware/hal_lcd_fonts.h b/MSP-EXP430F5438-CC256x/firmware/hal_lcd_fonts.h index 41582dcf2..554970ddf 100755 --- a/MSP-EXP430F5438-CC256x/firmware/hal_lcd_fonts.h +++ b/MSP-EXP430F5438-CC256x/firmware/hal_lcd_fonts.h @@ -3,7 +3,8 @@ Copyright 2008 Texas Instruments, Inc. ***************************************************************************/ -#pragma once +#ifndef __HAL_LCD_FONTS_H +#define __HAL_LCD_FONTS_H #define FONT_HEIGHT 12 // Each character has 13 lines @@ -11,3 +12,5 @@ extern const uint8_t fonts_lookup[]; extern const uint16_t fonts[]; + +#endif // __HAL_LCD_FONTS_H diff --git a/MSP-EXP430F5438-CC256x/firmware/hal_util.h b/MSP-EXP430F5438-CC256x/firmware/hal_util.h index 96786d745..e5bd89df9 100644 --- a/MSP-EXP430F5438-CC256x/firmware/hal_util.h +++ b/MSP-EXP430F5438-CC256x/firmware/hal_util.h @@ -1,3 +1,5 @@ -#pragma once +#ifndef __HAL_UTIL_H +#define __HAL_UTIL_H +#endif // __HAL_UTIL_H diff --git a/Ports/uCOS/btstack/src/run_loop_ucos.h b/Ports/uCOS/btstack/src/run_loop_ucos.h index b50c9e32e..73264d945 100644 --- a/Ports/uCOS/btstack/src/run_loop_ucos.h +++ b/Ports/uCOS/btstack/src/run_loop_ucos.h @@ -37,6 +37,9 @@ * Created by Albis Technologies. */ -#pragma once +#ifndef __RUN_LOOP_UCOS_H +#define __RUN_LOOP_UCOS_H void run_loop_notify_incoming_transport_packet(void); + +#endif // __RUN_LOOP_UCOS_H diff --git a/SpringBoardAccess/SpringBoardAccess.h b/SpringBoardAccess/SpringBoardAccess.h index 8cb17fca1..fdb9f7d9c 100644 --- a/SpringBoardAccess/SpringBoardAccess.h +++ b/SpringBoardAccess/SpringBoardAccess.h @@ -41,7 +41,8 @@ * Created by Matthias Ringwald on 9/20/09. * */ -#pragma once +#ifndef __SPRINGBOARDACCESS_H +#define __SPRINGBOARDACCESS_H #define SBA_MessagePortName "SpringBoardAccess" @@ -79,3 +80,5 @@ int SBA_setBluetoothEnabled(int on); * Tests if SpringBoardAccess server is available */ int SBA_available(); + +#endif // __SPRINGBOARDACCESS_H diff --git a/ble/att.h b/ble/att.h index 00f36fe0b..cf1490874 100644 --- a/ble/att.h +++ b/ble/att.h @@ -34,7 +34,8 @@ * */ -#pragma once +#ifndef __ATT_H +#define __ATT_H #include @@ -226,3 +227,5 @@ uint16_t att_prepare_handle_value_indication(att_connection_t * att_connection, #if defined __cplusplus } #endif + +#endif // __ATT_H diff --git a/ble/att_server.h b/ble/att_server.h index bd971d316..d8626651f 100644 --- a/ble/att_server.h +++ b/ble/att_server.h @@ -33,7 +33,8 @@ * Please inquire about commercial licensing options at contact@bluekitchen-gmbh.com * */ -#pragma once +#ifndef __ATT_SERVER_H +#define __ATT_SERVER_H #include #include @@ -78,3 +79,5 @@ int att_server_indicate(uint16_t handle, uint8_t *value, uint16_t value_len); #if defined __cplusplus } #endif + +#endif // __ATT_SERVER_H diff --git a/ble/central_device_db.h b/ble/central_device_db.h index 63660e9d1..df0b1d442 100644 --- a/ble/central_device_db.h +++ b/ble/central_device_db.h @@ -34,7 +34,8 @@ * */ -#pragma once +#ifndef __CENTRAL_DEVICE_DB_H +#define __CENTRAL_DEVICE_DB_H #include @@ -112,3 +113,5 @@ void central_device_db_counter_set(int index, uint32_t counter); * @param index */ void central_device_db_remove(int index); + +#endif // __CENTRAL_DEVICE_DB_H diff --git a/ble/gap_le.h b/ble/gap_le.h index 1590869fe..d8bc33a2a 100644 --- a/ble/gap_le.h +++ b/ble/gap_le.h @@ -34,7 +34,8 @@ * */ -#pragma once +#ifndef __GAP_LE_H +#define __GAP_LE_H #if defined __cplusplus extern "C" { @@ -62,3 +63,4 @@ void gap_random_address_set_mode(gap_random_address_type_t random_address_type); } #endif +#endif // __GAP_LE_H diff --git a/ble/sm.h b/ble/sm.h index 810a2cadd..a4dcff828 100644 --- a/ble/sm.h +++ b/ble/sm.h @@ -34,7 +34,8 @@ * */ -#pragma once +#ifndef __SM_H +#define __SM_H #include #include @@ -256,3 +257,5 @@ void sm_cmac_start(sm_key_t k, uint16_t message_len, uint8_t * message, void (*d #if defined __cplusplus } #endif + +#endif // __SM_H diff --git a/chipset-cc256x/bt_control_cc256x.h b/chipset-cc256x/bt_control_cc256x.h index 63f20b11e..e72ac255c 100644 --- a/chipset-cc256x/bt_control_cc256x.h +++ b/chipset-cc256x/bt_control_cc256x.h @@ -40,7 +40,8 @@ * Adapter to use cc256x-based chipsets with BTstack */ -#pragma once +#ifndef __BT_CONTROL_CC256X_H +#define __BT_CONTROL_CC256X_H #include #include "bt_control.h" @@ -52,4 +53,5 @@ void bt_control_cc256x_set_power(int16_t power_in_dB); void bt_control_cc256x_enable_ehcill(int on); int bt_control_cc256x_ehcill_enabled(void); -hci_uart_config_t *hci_uart_config_cc256x_instance(void); \ No newline at end of file +hci_uart_config_t *hci_uart_config_cc256x_instance(void); +#endif // __BT_CONTROL_CC256X_H diff --git a/eZ430-RF2560/firmware/hal_compat.h b/eZ430-RF2560/firmware/hal_compat.h index ca508f451..a90450eb1 100644 --- a/eZ430-RF2560/firmware/hal_compat.h +++ b/eZ430-RF2560/firmware/hal_compat.h @@ -7,7 +7,8 @@ // mspgcc LTS doesn't support 20-bit pointer yet -> put const data into .fartext -#pragma once +#ifndef __HAL_COMPAT_H +#define __HAL_COMPAT_H #include @@ -21,3 +22,4 @@ void FlashReadBlock(uint8_t *buffer, uint32_t addr, uint16_t len); +#endif // __HAL_COMPAT_H diff --git a/eZ430-RF2560/firmware/hal_util.h b/eZ430-RF2560/firmware/hal_util.h index 96786d745..e5bd89df9 100644 --- a/eZ430-RF2560/firmware/hal_util.h +++ b/eZ430-RF2560/firmware/hal_util.h @@ -1,3 +1,5 @@ -#pragma once +#ifndef __HAL_UTIL_H +#define __HAL_UTIL_H +#endif // __HAL_UTIL_H diff --git a/example/libusb/ad_parser.h b/example/libusb/ad_parser.h index ed35c2cfa..13f5ff7a0 100644 --- a/example/libusb/ad_parser.h +++ b/example/libusb/ad_parser.h @@ -37,7 +37,8 @@ // //***************************************************************************** -#pragma once +#ifndef __AD_PARSER_H +#define __AD_PARSER_H #include "config.h" @@ -68,4 +69,5 @@ int ad_data_contains_uuid128(uint8_t ad_len, uint8_t * ad_data, uint8_t * uuid12 #if defined __cplusplus } -#endif \ No newline at end of file +#endif +#endif // __AD_PARSER_H diff --git a/example/libusb/ble_client.h b/example/libusb/ble_client.h index d9627b2ef..696a1d4ad 100644 --- a/example/libusb/ble_client.h +++ b/example/libusb/ble_client.h @@ -40,7 +40,8 @@ // NOTE: Supports only a single connection -#pragma once +#ifndef __BLE_CLIENT_H +#define __BLE_CLIENT_H #include "config.h" @@ -190,4 +191,5 @@ le_command_status_t le_central_get_characteristics_for_service_with_uuid128(le_p #if defined __cplusplus } -#endif \ No newline at end of file +#endif +#endif // __BLE_CLIENT_H diff --git a/include/btstack/ant_cmds.h b/include/btstack/ant_cmds.h index 150411802..9362e5992 100644 --- a/include/btstack/ant_cmds.h +++ b/include/btstack/ant_cmds.h @@ -35,7 +35,8 @@ * */ -#pragma once +#ifndef __ANT_CMDS_H +#define __ANT_CMDS_H #include #include @@ -178,3 +179,5 @@ const ant_cmd_t ant_request_message; #if defined __cplusplus } #endif + +#endif // __ANT_CMDS_H diff --git a/include/btstack/btstack.h b/include/btstack/btstack.h index 4c866dc7f..9e6f97583 100644 --- a/include/btstack/btstack.h +++ b/include/btstack/btstack.h @@ -38,7 +38,8 @@ * */ -#pragma once +#ifndef __BTSTACK_H +#define __BTSTACK_H #include #include @@ -84,3 +85,5 @@ void bt_send_rfcomm(uint16_t rfcom_cid, uint8_t *data, uint16_t len); #if defined __cplusplus } #endif + +#endif // __BTSTACK_H diff --git a/include/btstack/hal_cpu.h b/include/btstack/hal_cpu.h index cdc7cb2a2..5656a968c 100644 --- a/include/btstack/hal_cpu.h +++ b/include/btstack/hal_cpu.h @@ -36,7 +36,8 @@ * and then unblocked while entering low power mode atomically */ -#pragma once +#ifndef __HAL_CPU_H +#define __HAL_CPU_H #if defined __cplusplus extern "C" { @@ -49,4 +50,4 @@ void hal_cpu_enable_irqs_and_sleep(void); #if defined __cplusplus } #endif - \ No newline at end of file + #endif // __HAL_CPU_H diff --git a/include/btstack/hal_tick.h b/include/btstack/hal_tick.h index 77d018228..f9c99799d 100644 --- a/include/btstack/hal_tick.h +++ b/include/btstack/hal_tick.h @@ -36,7 +36,8 @@ * */ -#pragma once +#ifndef __HAL_TICK_H +#define __HAL_TICK_H #include @@ -50,4 +51,5 @@ int hal_tick_get_tick_period_in_ms(void); #if defined __cplusplus } -#endif \ No newline at end of file +#endif +#endif // __HAL_TICK_H diff --git a/include/btstack/hal_uart_dma.h b/include/btstack/hal_uart_dma.h index d78162cc0..71eca534c 100644 --- a/include/btstack/hal_uart_dma.h +++ b/include/btstack/hal_uart_dma.h @@ -38,7 +38,8 @@ * */ -#pragma once +#ifndef __HAL_UART_DMA_H +#define __HAL_UART_DMA_H #include @@ -57,4 +58,5 @@ void hal_uart_dma_set_sleep(uint8_t sleep); #if defined __cplusplus } -#endif \ No newline at end of file +#endif +#endif // __HAL_UART_DMA_H diff --git a/include/btstack/hci_cmds.h b/include/btstack/hci_cmds.h index a958d97d3..54298951b 100644 --- a/include/btstack/hci_cmds.h +++ b/include/btstack/hci_cmds.h @@ -35,7 +35,8 @@ * Created by Matthias Ringwald on 7/23/09. */ -#pragma once +#ifndef __HCI_CMDS_H +#define __HCI_CMDS_H #include @@ -492,3 +493,5 @@ extern const hci_cmd_t rfcomm_persistent_channel_for_service; #if defined __cplusplus } #endif + +#endif // __HCI_CMDS_H diff --git a/include/btstack/linked_list.h b/include/btstack/linked_list.h index d9d4fba55..8e61715d6 100644 --- a/include/btstack/linked_list.h +++ b/include/btstack/linked_list.h @@ -35,7 +35,8 @@ * Created by Matthias Ringwald on 7/13/09. */ -#pragma once +#ifndef __LINKED_LIST_H +#define __LINKED_LIST_H #if defined __cplusplus extern "C" { @@ -61,3 +62,5 @@ void test_linked_list(void); #if defined __cplusplus } #endif + +#endif // __LINKED_LIST_H diff --git a/include/btstack/memory_pool.h b/include/btstack/memory_pool.h index 4310ad779..6a9f22b87 100644 --- a/include/btstack/memory_pool.h +++ b/include/btstack/memory_pool.h @@ -40,7 +40,8 @@ * @Note minimal implementation, no error checking/handling */ -#pragma once +#ifndef __MEMORY_POOL_H +#define __MEMORY_POOL_H #if defined __cplusplus extern "C" { @@ -60,3 +61,5 @@ void memory_pool_free(memory_pool_t *pool, void * block); #if defined __cplusplus } #endif + +#endif // __MEMORY_POOL_H diff --git a/include/btstack/run_loop.h b/include/btstack/run_loop.h index d7df0367e..8f139a752 100644 --- a/include/btstack/run_loop.h +++ b/include/btstack/run_loop.h @@ -35,7 +35,8 @@ * Created by Matthias Ringwald on 6/6/09. */ -#pragma once +#ifndef __RUN_LOOP_H +#define __RUN_LOOP_H #include "config.h" @@ -119,3 +120,4 @@ void embedded_trigger(void); } #endif +#endif // __RUN_LOOP_H diff --git a/include/btstack/sdp_util.h b/include/btstack/sdp_util.h index bffad2703..44d3f9ed7 100644 --- a/include/btstack/sdp_util.h +++ b/include/btstack/sdp_util.h @@ -33,7 +33,8 @@ * sdp_util.h */ -#pragma once +#ifndef __SDP_UTIL_H +#define __SDP_UTIL_H #include @@ -137,3 +138,5 @@ void sdp_normalize_uuid(uint8_t *uuid, uint32_t shortUUID); #if defined __cplusplus } #endif + +#endif // __SDP_UTIL_H diff --git a/include/btstack/utils.h b/include/btstack/utils.h index c83f8a91c..2f8288909 100644 --- a/include/btstack/utils.h +++ b/include/btstack/utils.h @@ -37,7 +37,8 @@ * Created by Matthias Ringwald on 7/23/09. */ -#pragma once +#ifndef __UTILS_H +#define __UTILS_H #if defined __cplusplus @@ -145,3 +146,4 @@ int is_authenticated_link_key(link_key_type_t link_key_type); } #endif +#endif // __UTILS_H diff --git a/src/bt_control.h b/src/bt_control.h index 515c30096..70dcec0a1 100644 --- a/src/bt_control.h +++ b/src/bt_control.h @@ -43,7 +43,8 @@ * */ -#pragma once +#ifndef __BT_CONTROL_H +#define __BT_CONTROL_H #include @@ -82,3 +83,5 @@ typedef struct { #if defined __cplusplus } #endif + +#endif // __BT_CONTROL_H diff --git a/src/bt_control_iphone.h b/src/bt_control_iphone.h index 3c3ddf5fa..86e67e9ef 100644 --- a/src/bt_control_iphone.h +++ b/src/bt_control_iphone.h @@ -41,7 +41,8 @@ * * Created by Matthias Ringwald on 5/19/09. */ -#pragma once +#ifndef __BT_CONTROL_IPHONE_H +#define __BT_CONTROL_IPHONE_H #include "bt_control.h" @@ -63,3 +64,4 @@ int iphone_system_has_csr(void); } #endif +#endif // __BT_CONTROL_IPHONE_H diff --git a/src/btstack_memory.h b/src/btstack_memory.h index cb22cfd29..4d34c1c01 100644 --- a/src/btstack_memory.h +++ b/src/btstack_memory.h @@ -41,7 +41,8 @@ * */ -#pragma once +#ifndef __BTSTACK_MEMORY_H +#define __BTSTACK_MEMORY_H #if defined __cplusplus extern "C" { @@ -71,3 +72,5 @@ void btstack_memory_db_mem_service_free(void *db_mem_service); #if defined __cplusplus } #endif + +#endif // __BTSTACK_MEMORY_H diff --git a/src/debug.h b/src/debug.h index 1a93e04d1..fec671a32 100644 --- a/src/debug.h +++ b/src/debug.h @@ -40,7 +40,8 @@ * allow to funnel debug & error messages */ -#pragma once +#ifndef __DEBUG_H +#define __DEBUG_H #include "config.h" #include "hci_dump.h" @@ -76,3 +77,5 @@ #else #define log_error(...) #endif + +#endif // __DEBUG_H diff --git a/src/gap.h b/src/gap.h index a5ffd9289..df911b6fe 100644 --- a/src/gap.h +++ b/src/gap.h @@ -34,7 +34,8 @@ * */ -#pragma once +#ifndef __GAP_H +#define __GAP_H #if defined __cplusplus extern "C" { @@ -100,3 +101,4 @@ int gap_mitm_protection_required_for_security_level(gap_security_level_t level) } #endif +#endif // __GAP_H diff --git a/src/hci.h b/src/hci.h index 405ed5678..192d09328 100644 --- a/src/hci.h +++ b/src/hci.h @@ -41,7 +41,8 @@ * */ -#pragma once +#ifndef __HCI_H +#define __HCI_H #include "config.h" @@ -457,3 +458,5 @@ void hci_le_advertisement_address(uint8_t * addr_type, bd_addr_t * addr); #if defined __cplusplus } #endif + +#endif // __HCI_H diff --git a/src/hci_dump.h b/src/hci_dump.h index 130d8307f..e929b9ca9 100644 --- a/src/hci_dump.h +++ b/src/hci_dump.h @@ -42,7 +42,8 @@ * Created by Matthias Ringwald on 5/26/09. */ -#pragma once +#ifndef __HCI_DUMP_H +#define __HCI_DUMP_H #include @@ -64,4 +65,5 @@ void hci_dump_close(void); #if defined __cplusplus } -#endif \ No newline at end of file +#endif +#endif // __HCI_DUMP_H diff --git a/src/hci_transport.h b/src/hci_transport.h index bd48f90c8..0a4b220fc 100644 --- a/src/hci_transport.h +++ b/src/hci_transport.h @@ -42,7 +42,8 @@ * Created by Matthias Ringwald on 4/29/09. * */ -#pragma once +#ifndef __HCI_TRANSPORT_H +#define __HCI_TRANSPORT_H #include #include @@ -86,3 +87,4 @@ extern void hci_transport_h4_iphone_set_enforce_wake_device(char *path); } #endif +#endif // __HCI_TRANSPORT_H diff --git a/src/l2cap.h b/src/l2cap.h index ae19ff288..15fa19b3d 100644 --- a/src/l2cap.h +++ b/src/l2cap.h @@ -42,7 +42,8 @@ * Created by Matthias Ringwald on 5/16/09. */ -#pragma once +#ifndef __L2CAP_H +#define __L2CAP_H #include "hci.h" #include "l2cap_signaling.h" @@ -250,3 +251,5 @@ int l2cap_le_request_connection_parameter_update(uint16_t handle, uint16_t inter #if defined __cplusplus } #endif + +#endif // __L2CAP_H diff --git a/src/l2cap_signaling.h b/src/l2cap_signaling.h index 61bc52f3b..3b734c4c9 100644 --- a/src/l2cap_signaling.h +++ b/src/l2cap_signaling.h @@ -40,7 +40,8 @@ * Created by Matthias Ringwald on 7/23/09. */ -#pragma once +#ifndef __L2CAP_SIGNALING_H +#define __L2CAP_SIGNALING_H #include #include @@ -76,3 +77,4 @@ uint16_t l2cap_next_local_cid(void); } #endif +#endif // __L2CAP_SIGNALING_H diff --git a/src/platform_iphone.h b/src/platform_iphone.h index df0b2663e..418c9d9a0 100644 --- a/src/platform_iphone.h +++ b/src/platform_iphone.h @@ -42,7 +42,8 @@ // Created by Matthias Ringwald on 8/15/09. // -#pragma once +#ifndef __PLATFORM_IPHONE_H +#define __PLATFORM_IPHONE_H #include "hci.h" @@ -58,3 +59,5 @@ int platform_iphone_logging_enabled(void); #if defined __cplusplus } #endif + +#endif // __PLATFORM_IPHONE_H diff --git a/src/remote_device_db.h b/src/remote_device_db.h index c7de97a0d..720d9dc3a 100644 --- a/src/remote_device_db.h +++ b/src/remote_device_db.h @@ -38,7 +38,8 @@ * interface to provide link key and remote name storage */ -#pragma once +#ifndef __REMOTE_DEVICE_DB_H +#define __REMOTE_DEVICE_DB_H #include #include "gap.h" @@ -103,3 +104,5 @@ typedef struct { #if defined __cplusplus } #endif + +#endif // __REMOTE_DEVICE_DB_H diff --git a/src/rfcomm.h b/src/rfcomm.h index ca5cd4384..ade8a9305 100644 --- a/src/rfcomm.h +++ b/src/rfcomm.h @@ -38,7 +38,8 @@ * RFCOMM.h */ -#pragma once +#ifndef __RFCOMM_H +#define __RFCOMM_H #include #include @@ -419,3 +420,5 @@ int rfcomm_send_port_configuration(uint16_t rfcomm_cid, rpn_baud_t baud_rate, rp #if defined __cplusplus } #endif + +#endif // __RFCOMM_H diff --git a/src/run_loop_private.h b/src/run_loop_private.h index 8a49b503c..a306302b9 100644 --- a/src/run_loop_private.h +++ b/src/run_loop_private.h @@ -40,7 +40,8 @@ * Created by Matthias Ringwald on 6/6/09. */ -#pragma once +#ifndef __RUN_LOOP_PRIVATE_H +#define __RUN_LOOP_PRIVATE_H #include @@ -71,3 +72,4 @@ typedef struct { } #endif +#endif // __RUN_LOOP_PRIVATE_H diff --git a/src/sdp.h b/src/sdp.h index 1e727991b..085e49cb6 100644 --- a/src/sdp.h +++ b/src/sdp.h @@ -33,7 +33,8 @@ * Please inquire about commercial licensing options at btstack@ringwald.ch * */ -#pragma once +#ifndef __SDP_H +#define __SDP_H #include #include @@ -108,4 +109,5 @@ void sdp_unregister_service_internal(void *connection, uint32_t service_record_h #if defined __cplusplus } -#endif \ No newline at end of file +#endif +#endif // __SDP_H diff --git a/src/sdp_client.h b/src/sdp_client.h index 0ba0ee432..5a8bd5bcf 100644 --- a/src/sdp_client.h +++ b/src/sdp_client.h @@ -38,7 +38,8 @@ * sdp_client.h */ -#pragma once +#ifndef __SDP_CLIENT_H +#define __SDP_CLIENT_H #include "config.h" @@ -64,3 +65,5 @@ void sdp_client_service_search(bd_addr_t remote, uint8_t * des_serviceSearchPatt #if defined __cplusplus } #endif + +#endif // __SDP_CLIENT_H diff --git a/src/sdp_parser.h b/src/sdp_parser.h index 482831f23..0f125ff1f 100644 --- a/src/sdp_parser.h +++ b/src/sdp_parser.h @@ -38,7 +38,8 @@ * sdp_parser.h */ -#pragma once +#ifndef __SDP_PARSER_H +#define __SDP_PARSER_H #include "config.h" @@ -117,3 +118,4 @@ void sdp_parser_register_callback(void (*sdp_callback)(sdp_query_event_t * event } #endif +#endif // __SDP_PARSER_H diff --git a/src/sdp_query_rfcomm.h b/src/sdp_query_rfcomm.h index e8589cf62..87cfe216f 100644 --- a/src/sdp_query_rfcomm.h +++ b/src/sdp_query_rfcomm.h @@ -38,7 +38,8 @@ * sdp_rfcomm_query.h */ -#pragma once +#ifndef __SDP_QUERY_RFCOMM_H +#define __SDP_QUERY_RFCOMM_H #include #include "sdp_parser.h" @@ -79,3 +80,5 @@ void sdp_query_rfcomm_register_callback(void(*sdp_app_callback)(sdp_query_event_ #if defined __cplusplus } #endif + +#endif // __SDP_QUERY_RFCOMM_H diff --git a/src/sdp_query_util.h b/src/sdp_query_util.h index 558f05f73..591bca3fa 100644 --- a/src/sdp_query_util.h +++ b/src/sdp_query_util.h @@ -38,7 +38,8 @@ * sdp_query_util.h */ -#pragma once +#ifndef __SDP_QUERY_UTIL_H +#define __SDP_QUERY_UTIL_H #if defined __cplusplus @@ -56,3 +57,5 @@ void sdp_general_query_for_uuid(bd_addr_t remote, uint16_t uuid); #if defined __cplusplus } #endif + +#endif // __SDP_QUERY_UTIL_H diff --git a/src/socket_connection.h b/src/socket_connection.h index b384aa9a9..8d5163c8b 100644 --- a/src/socket_connection.h +++ b/src/socket_connection.h @@ -41,7 +41,8 @@ * Created by Matthias Ringwald on 6/6/09. */ -#pragma once +#ifndef __SOCKET_CONNECTION_H +#define __SOCKET_CONNECTION_H #include @@ -125,3 +126,5 @@ int socket_connection_has_parked_connections(void); #if defined __cplusplus } #endif + +#endif // __SOCKET_CONNECTION_H diff --git a/test/sdp_client/config.h b/test/sdp_client/config.h index cd6331f69..19df7c673 100644 --- a/test/sdp_client/config.h +++ b/test/sdp_client/config.h @@ -1,5 +1,6 @@ // config.h created by configure for BTstack Sun Sep 25 16:06:59 CEST 2011 -#pragma once +#ifndef __CONFIG_H +#define __CONFIG_H #define HAVE_TRANSPORT_H4 #define UART_DEVICE "/dev/tty.usbserial-A600eIDu" #define UART_SPEED 115200 @@ -12,3 +13,5 @@ #define HAVE_SDP_EXTRA_QUERIES #define HCI_ACL_PAYLOAD_SIZE 1021 // #define HCI_ACL_PAYLOAD_SIZE 52 + +#endif // __CONFIG_H