{"id":14734,"url":"https://patchwork.libcamera.org/api/patches/14734/?format=json","web_url":"https://patchwork.libcamera.org/patch/14734/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211123224015.3619282-4-kieran.bingham@ideasonboard.com>","date":"2021-11-23T22:40:03","name":"[libcamera-devel,03/15] libcamera: internal: Convert to pragma once","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"d4ebcdf2d4327d00b51d74b816502731aeb7df34","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":{"id":11,"url":"https://patchwork.libcamera.org/api/users/11/?format=json","username":"kbingham","first_name":"Kieran","last_name":"Bingham","email":"kieran.bingham@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/14734/mbox/","series":[{"id":2749,"url":"https://patchwork.libcamera.org/api/series/2749/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2749","date":"2021-11-23T22:40:00","name":"Use pragma once","version":1,"mbox":"https://patchwork.libcamera.org/series/2749/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14734/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14734/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7FB35BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 23 Nov 2021 22:40:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C02B86022F;\n\tTue, 23 Nov 2021 23:40:27 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4A71260230\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 23 Nov 2021 23:40:21 +0100 (CET)","from Monstersaurus.ksquared.org.uk.beta.tailscale.net\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EC0C7A1B;\n\tTue, 23 Nov 2021 23:40:20 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Fy/1Hpg2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637707221;\n\tbh=eHjnGg3U+bEWEKvbvs9EydPTRXUfuF/JLUrTtnqPsaA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Fy/1Hpg2lY6RGEH0hdyAjtCzThxkOCIFMs0BxsrT3kFA3IhHbPXTNxvJ0oz06ptKu\n\t90OIhbaE+BQUDpKRnx64yKHw7YTT2nV9OlaX9Qh7Y9VlraS4KG76+qLdSCH74/gNrN\n\tAt7AiBBjWfDKqyYUMTFf0BBKx47g33OWFD9GEke8=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Tue, 23 Nov 2021 22:40:03 +0000","Message-Id":"<20211123224015.3619282-4-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","In-Reply-To":"<20211123224015.3619282-1-kieran.bingham@ideasonboard.com>","References":"<20211123224015.3619282-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 03/15] libcamera: internal: Convert to\n\tpragma once","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Remove the verbose #ifndef/#define/#endif pattern for maintaining\nheader idempotency, and replace it with a simple #pragma once.\n\nThis simplifies the headers, and prevents redundant changes when\nheader files get moved.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/internal/bayer_format.h             | 6 ++----\n include/libcamera/internal/byte_stream_buffer.h       | 6 ++----\n include/libcamera/internal/camera.h                   | 6 ++----\n include/libcamera/internal/camera_controls.h          | 6 ++----\n include/libcamera/internal/camera_sensor.h            | 6 ++----\n include/libcamera/internal/camera_sensor_properties.h | 6 ++----\n include/libcamera/internal/control_serializer.h       | 6 ++----\n include/libcamera/internal/control_validator.h        | 6 ++----\n include/libcamera/internal/delayed_controls.h         | 6 ++----\n include/libcamera/internal/device_enumerator.h        | 6 ++----\n include/libcamera/internal/device_enumerator_sysfs.h  | 6 ++----\n include/libcamera/internal/device_enumerator_udev.h   | 6 ++----\n include/libcamera/internal/formats.h                  | 5 +----\n include/libcamera/internal/framebuffer.h              | 6 ++----\n include/libcamera/internal/ipa_data_serializer.h      | 6 ++----\n include/libcamera/internal/ipa_manager.h              | 6 ++----\n include/libcamera/internal/ipa_module.h               | 6 ++----\n include/libcamera/internal/ipa_proxy.h                | 6 ++----\n include/libcamera/internal/ipc_pipe.h                 | 6 ++----\n include/libcamera/internal/ipc_pipe_unixsocket.h      | 6 ++----\n include/libcamera/internal/ipc_unixsocket.h           | 5 +----\n include/libcamera/internal/mapped_framebuffer.h       | 6 ++----\n include/libcamera/internal/media_device.h             | 6 ++----\n include/libcamera/internal/media_object.h             | 6 ++----\n include/libcamera/internal/pipeline_handler.h         | 6 ++----\n include/libcamera/internal/process.h                  | 6 ++----\n include/libcamera/internal/pub_key.h                  | 6 ++----\n include/libcamera/internal/source_paths.h             | 6 ++----\n include/libcamera/internal/sysfs.h                    | 6 ++----\n include/libcamera/internal/tracepoints.h.in           | 6 ++----\n include/libcamera/internal/v4l2_device.h              | 6 ++----\n include/libcamera/internal/v4l2_pixelformat.h         | 6 ++----\n include/libcamera/internal/v4l2_subdevice.h           | 6 ++----\n include/libcamera/internal/v4l2_videodevice.h         | 6 ++----\n 34 files changed, 66 insertions(+), 136 deletions(-)","diff":"diff --git a/include/libcamera/internal/bayer_format.h b/include/libcamera/internal/bayer_format.h\nindex 79a25b52582d..cb20bf9bea84 100644\n--- a/include/libcamera/internal/bayer_format.h\n+++ b/include/libcamera/internal/bayer_format.h\n@@ -4,8 +4,8 @@\n  *\n  * bayer_format.h - Bayer Pixel Format\n  */\n-#ifndef __LIBCAMERA_INTERNAL_BAYER_FORMAT_H__\n-#define __LIBCAMERA_INTERNAL_BAYER_FORMAT_H__\n+\n+#pragma once\n \n #include <stdint.h>\n #include <string>\n@@ -69,5 +69,3 @@ static inline bool operator!=(const BayerFormat &lhs, const BayerFormat &rhs)\n }\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_BAYER_FORMAT_H__ */\ndiff --git a/include/libcamera/internal/byte_stream_buffer.h b/include/libcamera/internal/byte_stream_buffer.h\nindex d0f0df5ee87b..0f4fce6f4dc0 100644\n--- a/include/libcamera/internal/byte_stream_buffer.h\n+++ b/include/libcamera/internal/byte_stream_buffer.h\n@@ -4,8 +4,8 @@\n  *\n  * byte_stream_buffer.h - Byte stream buffer\n  */\n-#ifndef __LIBCAMERA_INTERNAL_BYTE_STREAM_BUFFER_H__\n-#define __LIBCAMERA_INTERNAL_BYTE_STREAM_BUFFER_H__\n+\n+#pragma once\n \n #include <stddef.h>\n #include <stdint.h>\n@@ -85,5 +85,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_BYTE_STREAM_BUFFER_H__ */\ndiff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h\nindex 9f5adac12a77..597426a6f9d2 100644\n--- a/include/libcamera/internal/camera.h\n+++ b/include/libcamera/internal/camera.h\n@@ -4,8 +4,8 @@\n  *\n  * camera.h - Camera private data\n  */\n-#ifndef __LIBCAMERA_INTERNAL_CAMERA_H__\n-#define __LIBCAMERA_INTERNAL_CAMERA_H__\n+\n+#pragma once\n \n #include <atomic>\n #include <list>\n@@ -72,5 +72,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_CAMERA_H__ */\ndiff --git a/include/libcamera/internal/camera_controls.h b/include/libcamera/internal/camera_controls.h\nindex 6e40f4436cad..ee6d382f8989 100644\n--- a/include/libcamera/internal/camera_controls.h\n+++ b/include/libcamera/internal/camera_controls.h\n@@ -4,8 +4,8 @@\n  *\n  * camera_controls.h - Camera controls\n  */\n-#ifndef __LIBCAMERA_INTERNAL_CAMERA_CONTROLS_H__\n-#define __LIBCAMERA_INTERNAL_CAMERA_CONTROLS_H__\n+\n+#pragma once\n \n #include \"libcamera/internal/control_validator.h\"\n \n@@ -26,5 +26,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_CAMERA_CONTROLS_H__ */\ndiff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\nindex d25a1165a06c..2facbf3c8dc0 100644\n--- a/include/libcamera/internal/camera_sensor.h\n+++ b/include/libcamera/internal/camera_sensor.h\n@@ -4,8 +4,8 @@\n  *\n  * camera_sensor.h - A camera sensor\n  */\n-#ifndef __LIBCAMERA_INTERNAL_CAMERA_SENSOR_H__\n-#define __LIBCAMERA_INTERNAL_CAMERA_SENSOR_H__\n+\n+#pragma once\n \n #include <memory>\n #include <string>\n@@ -94,5 +94,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_CAMERA_SENSOR_H__ */\ndiff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\nindex 67c77920eb38..af381a121bfc 100644\n--- a/include/libcamera/internal/camera_sensor_properties.h\n+++ b/include/libcamera/internal/camera_sensor_properties.h\n@@ -4,8 +4,8 @@\n  *\n  * camera_sensor_properties.h - Database of camera sensor properties\n  */\n-#ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n-#define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n+\n+#pragma once\n \n #include <map>\n #include <string>\n@@ -22,5 +22,3 @@ struct CameraSensorProperties {\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ */\ndiff --git a/include/libcamera/internal/control_serializer.h b/include/libcamera/internal/control_serializer.h\nindex caeafa11bc54..99e57feed608 100644\n--- a/include/libcamera/internal/control_serializer.h\n+++ b/include/libcamera/internal/control_serializer.h\n@@ -4,8 +4,8 @@\n  *\n  * control_serializer.h - Control (de)serializer\n  */\n-#ifndef __LIBCAMERA_INTERNAL_CONTROL_SERIALIZER_H__\n-#define __LIBCAMERA_INTERNAL_CONTROL_SERIALIZER_H__\n+\n+#pragma once\n \n #include <map>\n #include <memory>\n@@ -60,5 +60,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_CONTROL_SERIALIZER_H__ */\ndiff --git a/include/libcamera/internal/control_validator.h b/include/libcamera/internal/control_validator.h\nindex 206006954cd9..26412d8bac9a 100644\n--- a/include/libcamera/internal/control_validator.h\n+++ b/include/libcamera/internal/control_validator.h\n@@ -4,8 +4,8 @@\n  *\n  * control_validator.h - Control validator\n  */\n-#ifndef __LIBCAMERA_INTERNAL_CONTROL_VALIDATOR_H__\n-#define __LIBCAMERA_INTERNAL_CONTROL_VALIDATOR_H__\n+\n+#pragma once\n \n #include <string>\n \n@@ -23,5 +23,3 @@ public:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_CONTROL_VALIDATOR_H__ */\ndiff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h\nindex 2a6a912bde10..703fdb66bc27 100644\n--- a/include/libcamera/internal/delayed_controls.h\n+++ b/include/libcamera/internal/delayed_controls.h\n@@ -4,8 +4,8 @@\n  *\n  * delayed_controls.h - Helper to deal with controls that take effect with a delay\n  */\n-#ifndef __LIBCAMERA_INTERNAL_DELAYED_CONTROLS_H__\n-#define __LIBCAMERA_INTERNAL_DELAYED_CONTROLS_H__\n+\n+#pragma once\n \n #include <stdint.h>\n #include <unordered_map>\n@@ -82,5 +82,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_DELAYED_CONTROLS_H__ */\ndiff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h\nindex baccfc000d87..72ec9a60b19a 100644\n--- a/include/libcamera/internal/device_enumerator.h\n+++ b/include/libcamera/internal/device_enumerator.h\n@@ -4,8 +4,8 @@\n  *\n  * device_enumerator.h - API to enumerate and find media devices\n  */\n-#ifndef __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_H__\n-#define __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_H__\n+\n+#pragma once\n \n #include <memory>\n #include <string>\n@@ -55,5 +55,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif\t/* __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_H__ */\ndiff --git a/include/libcamera/internal/device_enumerator_sysfs.h b/include/libcamera/internal/device_enumerator_sysfs.h\nindex 2112bc543054..3e84b83f3200 100644\n--- a/include/libcamera/internal/device_enumerator_sysfs.h\n+++ b/include/libcamera/internal/device_enumerator_sysfs.h\n@@ -4,8 +4,8 @@\n  *\n  * device_enumerator_sysfs.h - sysfs-based device enumerator\n  */\n-#ifndef __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_SYSFS_H__\n-#define __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_SYSFS_H__\n+\n+#pragma once\n \n #include <memory>\n #include <string>\n@@ -28,5 +28,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_SYSFS_H__ */\ndiff --git a/include/libcamera/internal/device_enumerator_udev.h b/include/libcamera/internal/device_enumerator_udev.h\nindex c035298081b4..1b3360df31ba 100644\n--- a/include/libcamera/internal/device_enumerator_udev.h\n+++ b/include/libcamera/internal/device_enumerator_udev.h\n@@ -4,8 +4,8 @@\n  *\n  * device_enumerator_udev.h - udev-based device enumerator\n  */\n-#ifndef __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_UDEV_H__\n-#define __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_UDEV_H__\n+\n+#pragma once\n \n #include <list>\n #include <map>\n@@ -71,5 +71,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif\t/* __LIBCAMERA_INTERNAL_DEVICE_ENUMERATOR_UDEV_H__ */\ndiff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h\nindex 5ebc68f91cda..ee599765be47 100644\n--- a/include/libcamera/internal/formats.h\n+++ b/include/libcamera/internal/formats.h\n@@ -5,8 +5,7 @@\n  * formats.h - libcamera image formats\n  */\n \n-#ifndef __LIBCAMERA_INTERNAL_FORMATS_H__\n-#define __LIBCAMERA_INTERNAL_FORMATS_H__\n+#pragma once\n \n #include <array>\n #include <map>\n@@ -68,5 +67,3 @@ public:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_FORMATS_H__ */\ndiff --git a/include/libcamera/internal/framebuffer.h b/include/libcamera/internal/framebuffer.h\nindex cd33c295466e..908b478985e7 100644\n--- a/include/libcamera/internal/framebuffer.h\n+++ b/include/libcamera/internal/framebuffer.h\n@@ -4,8 +4,8 @@\n  *\n  * framebuffer.h - Internal frame buffer handling\n  */\n-#ifndef __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__\n-#define __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__\n+\n+#pragma once\n \n #include <libcamera/base/class.h>\n \n@@ -29,5 +29,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_FRAMEBUFFER_H__ */\ndiff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h\nindex 4353e07b572d..c2f602d5b7de 100644\n--- a/include/libcamera/internal/ipa_data_serializer.h\n+++ b/include/libcamera/internal/ipa_data_serializer.h\n@@ -4,8 +4,8 @@\n  *\n  * ipa_data_serializer.h - Image Processing Algorithm data serializer\n  */\n-#ifndef __LIBCAMERA_INTERNAL_IPA_DATA_SERIALIZER_H__\n-#define __LIBCAMERA_INTERNAL_IPA_DATA_SERIALIZER_H__\n+\n+#pragma once\n \n #include <deque>\n #include <iostream>\n@@ -304,5 +304,3 @@ public:\n #endif /* __DOXYGEN__ */\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPA_DATA_SERIALIZER_H__ */\ndiff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h\nindex 0687842e5c06..7f36e58e8bfa 100644\n--- a/include/libcamera/internal/ipa_manager.h\n+++ b/include/libcamera/internal/ipa_manager.h\n@@ -4,8 +4,8 @@\n  *\n  * ipa_manager.h - Image Processing Algorithm module manager\n  */\n-#ifndef __LIBCAMERA_INTERNAL_IPA_MANAGER_H__\n-#define __LIBCAMERA_INTERNAL_IPA_MANAGER_H__\n+\n+#pragma once\n \n #include <stdint.h>\n #include <vector>\n@@ -68,5 +68,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPA_MANAGER_H__ */\ndiff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h\nindex a87f56502b9a..8038bdee6b3c 100644\n--- a/include/libcamera/internal/ipa_module.h\n+++ b/include/libcamera/internal/ipa_module.h\n@@ -4,8 +4,8 @@\n  *\n  * ipa_module.h - Image Processing Algorithm module\n  */\n-#ifndef __LIBCAMERA_INTERNAL_IPA_MODULE_H__\n-#define __LIBCAMERA_INTERNAL_IPA_MODULE_H__\n+\n+#pragma once\n \n #include <stdint.h>\n #include <string>\n@@ -58,5 +58,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPA_MODULE_H__ */\ndiff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\nindex ea9f0760c2fc..781c8b623605 100644\n--- a/include/libcamera/internal/ipa_proxy.h\n+++ b/include/libcamera/internal/ipa_proxy.h\n@@ -4,8 +4,8 @@\n  *\n  * ipa_proxy.h - Image Processing Algorithm proxy\n  */\n-#ifndef __LIBCAMERA_INTERNAL_IPA_PROXY_H__\n-#define __LIBCAMERA_INTERNAL_IPA_PROXY_H__\n+\n+#pragma once\n \n #include <memory>\n #include <string>\n@@ -44,5 +44,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPA_PROXY_H__ */\ndiff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h\nindex 52cc8fa30838..bd8824f255c2 100644\n--- a/include/libcamera/internal/ipc_pipe.h\n+++ b/include/libcamera/internal/ipc_pipe.h\n@@ -4,8 +4,8 @@\n  *\n  * ipc_pipe.h - Image Processing Algorithm IPC module for IPA proxies\n  */\n-#ifndef __LIBCAMERA_INTERNAL_IPA_IPC_H__\n-#define __LIBCAMERA_INTERNAL_IPA_IPC_H__\n+\n+#pragma once\n \n #include <vector>\n \n@@ -67,5 +67,3 @@ protected:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPA_IPC_H__ */\ndiff --git a/include/libcamera/internal/ipc_pipe_unixsocket.h b/include/libcamera/internal/ipc_pipe_unixsocket.h\nindex ad2927fed7f0..004d953989c6 100644\n--- a/include/libcamera/internal/ipc_pipe_unixsocket.h\n+++ b/include/libcamera/internal/ipc_pipe_unixsocket.h\n@@ -4,8 +4,8 @@\n  *\n  * ipc_pipe_unixsocket.h - Image Processing Algorithm IPC module using unix socket\n  */\n-#ifndef __LIBCAMERA_INTERNAL_IPA_IPC_UNIXSOCKET_H__\n-#define __LIBCAMERA_INTERNAL_IPA_IPC_UNIXSOCKET_H__\n+\n+#pragma once\n \n #include <map>\n #include <memory>\n@@ -45,5 +45,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPA_IPC_UNIXSOCKET_H__ */\ndiff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h\nindex 2b87196c4851..5010b66a2bda 100644\n--- a/include/libcamera/internal/ipc_unixsocket.h\n+++ b/include/libcamera/internal/ipc_unixsocket.h\n@@ -5,8 +5,7 @@\n  * ipc_unixsocket.h - IPC mechanism based on Unix sockets\n  */\n \n-#ifndef __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__\n-#define __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__\n+#pragma once\n \n #include <stdint.h>\n #include <sys/types.h>\n@@ -57,5 +56,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_IPC_UNIXSOCKET_H__ */\ndiff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h\nindex 70ffbcbea078..fb39adbf5796 100644\n--- a/include/libcamera/internal/mapped_framebuffer.h\n+++ b/include/libcamera/internal/mapped_framebuffer.h\n@@ -4,8 +4,8 @@\n  *\n  * mapped_framebuffer.h - Frame buffer memory mapping support\n  */\n-#ifndef __LIBCAMERA_INTERNAL_MAPPED_FRAMEBUFFER_H__\n-#define __LIBCAMERA_INTERNAL_MAPPED_FRAMEBUFFER_H__\n+\n+#pragma once\n \n #include <stdint.h>\n #include <vector>\n@@ -60,5 +60,3 @@ public:\n LIBCAMERA_FLAGS_ENABLE_OPERATORS(MappedFrameBuffer::MapFlag)\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_MAPPED_FRAMEBUFFER_H__ */\ndiff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h\nindex 1f2304c19281..d636e34a8573 100644\n--- a/include/libcamera/internal/media_device.h\n+++ b/include/libcamera/internal/media_device.h\n@@ -4,8 +4,8 @@\n  *\n  * media_device.h - Media device handler\n  */\n-#ifndef __LIBCAMERA_INTERNAL_MEDIA_DEVICE_H__\n-#define __LIBCAMERA_INTERNAL_MEDIA_DEVICE_H__\n+\n+#pragma once\n \n #include <map>\n #include <sstream>\n@@ -92,5 +92,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_MEDIA_DEVICE_H__ */\ndiff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h\nindex 6ae22c679cc5..90c635983ba7 100644\n--- a/include/libcamera/internal/media_object.h\n+++ b/include/libcamera/internal/media_object.h\n@@ -4,8 +4,8 @@\n  *\n  * media_object.h - Media Device objects: entities, pads and links.\n  */\n-#ifndef __LIBCAMERA_INTERNAL_MEDIA_OBJECT_H__\n-#define __LIBCAMERA_INTERNAL_MEDIA_OBJECT_H__\n+\n+#pragma once\n \n #include <string>\n #include <vector>\n@@ -132,5 +132,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_MEDIA_OBJECT_H__ */\ndiff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\nindex 41cba44d990f..3de27ae93645 100644\n--- a/include/libcamera/internal/pipeline_handler.h\n+++ b/include/libcamera/internal/pipeline_handler.h\n@@ -4,8 +4,8 @@\n  *\n  * pipeline_handler.h - Pipeline handler infrastructure\n  */\n-#ifndef __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__\n-#define __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__\n+\n+#pragma once\n \n #include <memory>\n #include <set>\n@@ -118,5 +118,3 @@ private:\t\t\t\t\t\t\t\t\\\n static handler##Factory global_##handler##Factory;\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__ */\ndiff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h\nindex 300e0521eb03..96748a3676e4 100644\n--- a/include/libcamera/internal/process.h\n+++ b/include/libcamera/internal/process.h\n@@ -4,8 +4,8 @@\n  *\n  * process.h - Process object\n  */\n-#ifndef __LIBCAMERA_INTERNAL_PROCESS_H__\n-#define __LIBCAMERA_INTERNAL_PROCESS_H__\n+\n+#pragma once\n \n #include <signal.h>\n #include <string>\n@@ -80,5 +80,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_PROCESS_H__ */\ndiff --git a/include/libcamera/internal/pub_key.h b/include/libcamera/internal/pub_key.h\nindex 9261c9c2a0ee..a22ba037cff6 100644\n--- a/include/libcamera/internal/pub_key.h\n+++ b/include/libcamera/internal/pub_key.h\n@@ -4,8 +4,8 @@\n  *\n  * pub_key.h - Public key signature verification\n  */\n-#ifndef __LIBCAMERA_INTERNAL_PUB_KEY_H__\n-#define __LIBCAMERA_INTERNAL_PUB_KEY_H__\n+\n+#pragma once\n \n #include <stdint.h>\n \n@@ -34,5 +34,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_PUB_KEY_H__ */\ndiff --git a/include/libcamera/internal/source_paths.h b/include/libcamera/internal/source_paths.h\nindex 111c25b00b43..be6f153b49db 100644\n--- a/include/libcamera/internal/source_paths.h\n+++ b/include/libcamera/internal/source_paths.h\n@@ -4,8 +4,8 @@\n  *\n  * source_paths.h - Identify libcamera source and build paths\n  */\n-#ifndef __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__\n-#define __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__\n+\n+#pragma once\n \n #include <string>\n \n@@ -15,5 +15,3 @@ std::string libcameraBuildPath();\n std::string libcameraSourcePath();\n \n } /* namespace libcamera::utils */\n-\n-#endif /* __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__ */\ndiff --git a/include/libcamera/internal/sysfs.h b/include/libcamera/internal/sysfs.h\nindex bc6c1620b55d..917457bef6e2 100644\n--- a/include/libcamera/internal/sysfs.h\n+++ b/include/libcamera/internal/sysfs.h\n@@ -4,8 +4,8 @@\n  *\n  * sysfs.h - Miscellaneous utility functions to access sysfs\n  */\n-#ifndef __LIBCAMERA_INTERNAL_SYSFS_H__\n-#define __LIBCAMERA_INTERNAL_SYSFS_H__\n+\n+#pragma once\n \n #include <string>\n \n@@ -20,5 +20,3 @@ std::string firmwareNodePath(const std::string &device);\n } /* namespace sysfs */\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_SYSFS_H__ */\ndiff --git a/include/libcamera/internal/tracepoints.h.in b/include/libcamera/internal/tracepoints.h.in\nindex d0fc136598b6..b093bc6b5eda 100644\n--- a/include/libcamera/internal/tracepoints.h.in\n+++ b/include/libcamera/internal/tracepoints.h.in\n@@ -6,8 +6,8 @@\n  *\n  * This file is auto-generated. Do not edit.\n  */\n-#ifndef __LIBCAMERA_INTERNAL_TRACEPOINTS_H__\n-#define __LIBCAMERA_INTERNAL_TRACEPOINTS_H__\n+\n+#pragma once\n \n #if HAVE_TRACING\n #define LIBCAMERA_TRACEPOINT(...) tracepoint(libcamera, __VA_ARGS__)\n@@ -36,8 +36,6 @@ inline void unused([[maybe_unused]] Args&& ...args)\n \n #endif /* HAVE_TRACING */\n \n-#endif /* __LIBCAMERA_INTERNAL_TRACEPOINTS_H__ */\n-\n \n #if HAVE_TRACING\n \ndiff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\nindex f21bc3701ca0..7816a290141d 100644\n--- a/include/libcamera/internal/v4l2_device.h\n+++ b/include/libcamera/internal/v4l2_device.h\n@@ -4,8 +4,8 @@\n  *\n  * v4l2_device.h - Common base for V4L2 video devices and subdevices\n  */\n-#ifndef __LIBCAMERA_INTERNAL_V4L2_DEVICE_H__\n-#define __LIBCAMERA_INTERNAL_V4L2_DEVICE_H__\n+\n+#pragma once\n \n #include <map>\n #include <memory>\n@@ -79,5 +79,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_V4L2_DEVICE_H__ */\ndiff --git a/include/libcamera/internal/v4l2_pixelformat.h b/include/libcamera/internal/v4l2_pixelformat.h\nindex e3cda6997c32..886d534d8c91 100644\n--- a/include/libcamera/internal/v4l2_pixelformat.h\n+++ b/include/libcamera/internal/v4l2_pixelformat.h\n@@ -5,8 +5,8 @@\n  *\n  * v4l2_pixelformat.h - V4L2 Pixel Format\n  */\n-#ifndef __LIBCAMERA_INTERNAL_V4L2_PIXELFORMAT_H__\n-#define __LIBCAMERA_INTERNAL_V4L2_PIXELFORMAT_H__\n+\n+#pragma once\n \n #include <stdint.h>\n #include <string>\n@@ -51,5 +51,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_V4L2_PIXELFORMAT_H__ */\ndiff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\nindex 97b89fb95087..484fcfdda9b1 100644\n--- a/include/libcamera/internal/v4l2_subdevice.h\n+++ b/include/libcamera/internal/v4l2_subdevice.h\n@@ -4,8 +4,8 @@\n  *\n  * v4l2_subdevice.h - V4L2 Subdevice\n  */\n-#ifndef __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__\n-#define __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__\n+\n+#pragma once\n \n #include <memory>\n #include <string>\n@@ -78,5 +78,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_V4L2_SUBDEVICE_H__ */\ndiff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex a1c458e45088..4a44b7fd53b1 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -4,8 +4,8 @@\n  *\n  * v4l2_videodevice.h - V4L2 Video Device\n  */\n-#ifndef __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__\n-#define __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__\n+\n+#pragma once\n \n #include <array>\n #include <atomic>\n@@ -278,5 +278,3 @@ private:\n };\n \n } /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_INTERNAL_V4L2_VIDEODEVICE_H__ */\n","prefixes":["libcamera-devel","03/15"]}