You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2018/07/04 01:13:56 UTC

[trafficserver] branch master updated: Converts remaining source files to #pragma once

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new be5d692  Converts remaining source files to #pragma once
be5d692 is described below

commit be5d692035cf024891200084379fc36558e3f9b9
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Mon Jul 2 13:04:29 2018 -0700

    Converts remaining source files to #pragma once
---
 example/protocol/Protocol.h                         |  5 +----
 example/protocol/TxnSM.h                            |  5 +----
 iocore/net/P_InkBulkIO.h                            |  5 +----
 iocore/net/P_LibBulkIO.h                            |  5 +----
 iocore/net/P_SSLNetProcessor.h                      |  6 ++----
 mgmt/Alarms.h                                       |  5 +----
 mgmt/BaseManager.h                                  |  5 +----
 mgmt/LocalManager.h                                 |  5 +----
 mgmt/MgmtDefs.h                                     |  5 +----
 mgmt/ProcessManager.h                               |  5 +----
 mgmt/api/TSControlMain.h                            |  5 +----
 mgmt/utils/MgmtUtils.h                              |  5 +----
 plugins/compress/debug_macros.h                     |  5 +----
 plugins/esi/fetcher/FetchedDataProcessor.h          |  6 +-----
 plugins/esi/fetcher/HttpDataFetcher.h               |  5 +----
 plugins/esi/fetcher/HttpDataFetcherImpl.h           |  5 +----
 plugins/esi/lib/Attribute.h                         |  5 +----
 plugins/esi/lib/ComponentBase.h                     |  5 +----
 plugins/esi/lib/DocNode.h                           |  5 +----
 plugins/esi/lib/EsiGunzip.h                         |  6 ++----
 plugins/esi/lib/EsiGzip.h                           |  5 +----
 plugins/esi/lib/EsiParser.h                         |  5 +----
 plugins/esi/lib/EsiProcessor.h                      |  5 +----
 plugins/esi/lib/Expression.h                        |  6 +-----
 plugins/esi/lib/FailureInfo.h                       | 10 ++++++----
 plugins/esi/lib/HandlerManager.h                    |  6 +-----
 plugins/esi/lib/HttpHeader.h                        |  6 +-----
 plugins/esi/lib/IncludeHandlerFactory.h             |  6 +-----
 plugins/esi/lib/Stats.h                             |  6 +-----
 plugins/esi/lib/StringHash.h                        |  6 +-----
 plugins/esi/lib/Utils.h                             |  6 +-----
 plugins/esi/lib/Variables.h                         |  6 +-----
 plugins/esi/lib/gzip.h                              |  6 +-----
 plugins/esi/serverIntercept.h                       |  6 +-----
 plugins/esi/test/HandlerMap.h                       |  6 +-----
 plugins/esi/test/StubIncludeHandler.h               |  6 +-----
 plugins/esi/test/TestHttpDataFetcher.h              |  5 +----
 plugins/esi/test/print_funcs.h                      |  5 +----
 plugins/experimental/inliner/cache-handler.h        |  6 ++----
 plugins/experimental/inliner/cache.h                |  5 ++---
 plugins/experimental/inliner/chunk-decoder.h        |  6 ++----
 plugins/experimental/inliner/fetcher.h              |  6 ++----
 plugins/experimental/inliner/gif.h                  |  6 ++----
 plugins/experimental/inliner/html-parser.h          |  6 ++----
 plugins/experimental/inliner/inliner-handler.h      |  6 ++----
 plugins/experimental/inliner/jpeg.h                 |  6 ++----
 plugins/experimental/inliner/png.h                  |  6 ++----
 plugins/experimental/inliner/ts.h                   |  6 ++----
 plugins/experimental/inliner/util.h                 |  6 ++----
 plugins/experimental/inliner/vconnection.h          |  6 ++----
 plugins/experimental/memcache/protocol_binary.h     |  4 +---
 plugins/experimental/money_trace/money_trace.h      |  5 +----
 plugins/experimental/mp4/mp4_common.h               |  5 +----
 plugins/experimental/mp4/mp4_meta.h                 |  5 +----
 plugins/experimental/multiplexer/chunk-decoder.h    |  6 ++----
 plugins/experimental/multiplexer/dispatch.h         |  6 ++----
 plugins/experimental/multiplexer/fetcher.h          |  6 ++----
 plugins/experimental/multiplexer/original-request.h |  6 ++----
 plugins/experimental/multiplexer/post.h             |  6 ++----
 plugins/experimental/multiplexer/ts.h               |  6 +++---
 plugins/lua/ts_lua_cached_response.h                |  5 +----
 plugins/lua/ts_lua_client_request.h                 |  5 +----
 plugins/lua/ts_lua_client_response.h                |  5 +----
 plugins/lua/ts_lua_common.h                         |  5 +----
 plugins/lua/ts_lua_constant.h                       |  5 +----
 plugins/lua/ts_lua_context.h                        |  5 +----
 plugins/lua/ts_lua_coroutine.h                      |  6 ++----
 plugins/lua/ts_lua_crypto.h                         |  5 +----
 plugins/lua/ts_lua_fetch.h                          |  5 +----
 plugins/lua/ts_lua_hook.h                           |  5 +----
 plugins/lua/ts_lua_http.h                           |  5 +----
 plugins/lua/ts_lua_http_cntl.h                      |  5 +----
 plugins/lua/ts_lua_http_config.h                    |  5 +----
 plugins/lua/ts_lua_http_intercept.h                 |  5 +----
 plugins/lua/ts_lua_http_milestone.h                 |  5 +----
 plugins/lua/ts_lua_io.h                             |  5 +----
 plugins/lua/ts_lua_log.h                            |  5 +----
 plugins/lua/ts_lua_mgmt.h                           |  5 +----
 plugins/lua/ts_lua_misc.h                           |  5 +----
 plugins/lua/ts_lua_package.h                        |  5 +----
 plugins/lua/ts_lua_remap.h                          |  5 +----
 plugins/lua/ts_lua_server_request.h                 |  5 +----
 plugins/lua/ts_lua_server_response.h                |  5 +----
 plugins/lua/ts_lua_stat.h                           |  5 +----
 plugins/lua/ts_lua_string.h                         |  5 +----
 plugins/lua/ts_lua_transform.h                      |  5 +----
 plugins/lua/ts_lua_util.h                           |  5 +----
 src/traffic_cache_tool/CacheScan.h                  |  6 ++----
 88 files changed, 116 insertions(+), 362 deletions(-)

diff --git a/example/protocol/Protocol.h b/example/protocol/Protocol.h
index 18e1034..6d883c1 100644
--- a/example/protocol/Protocol.h
+++ b/example/protocol/Protocol.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef PROTOCOL_H
-#define PROTOCOL_H
+#pragma once
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -47,5 +46,3 @@
   {                         \
     _d = _s;                \
   }
-
-#endif /* PROTOCOL_H */
diff --git a/example/protocol/TxnSM.h b/example/protocol/TxnSM.h
index cf6d657..b3e8f3f 100644
--- a/example/protocol/TxnSM.h
+++ b/example/protocol/TxnSM.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef TXN_SM_H
-#define TXN_SM_H
+#pragma once
 
 #include "Protocol.h"
 
@@ -79,5 +78,3 @@ typedef struct _TxnSM {
   TSIOBufferReader q_cache_read_buffer_reader;
 
 } TxnSM;
-
-#endif /* Txn_SM_H */
diff --git a/iocore/net/P_InkBulkIO.h b/iocore/net/P_InkBulkIO.h
index f24b95a..376bf44 100644
--- a/iocore/net/P_InkBulkIO.h
+++ b/iocore/net/P_InkBulkIO.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _INK_BULK_IO_H
-#define _INK_BULK_IO_H
+#pragma once
 
 #ifndef _KERNEL_
 #include <netinet/ip.h>
@@ -165,5 +164,3 @@ struct InkBulkIORequest {
   ((INKBIO_PKT_SIZE_WO_UDPHDR -                                                                           \
     (sizeof(struct InkBulkIORequest) + sizeof(struct InkBulkIOPkt) + sizeof(struct InkBulkIOAddrInfo))) / \
    (sizeof(struct InkBulkIOPkt) + sizeof(struct InkBulkIOAddrInfo)))
-
-#endif
diff --git a/iocore/net/P_LibBulkIO.h b/iocore/net/P_LibBulkIO.h
index 83a2bf5..a52866c 100644
--- a/iocore/net/P_LibBulkIO.h
+++ b/iocore/net/P_LibBulkIO.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _LIB_BULK_IO_H
-#define _LIB_BULK_IO_H
+#pragma once
 
 #if defined(solaris)
 #include <stdio.h>
@@ -171,5 +170,3 @@ void BulkIOFlush(struct InkBulkIOState *bioCookie, struct InkBulkIOAggregator *b
 
 void CopyFromIOBufferBlock(char *dest, Ptr<IOBufferBlock> pktChain, uint32_t nbytes);
 #endif
-
-#endif
diff --git a/iocore/net/P_SSLNetProcessor.h b/iocore/net/P_SSLNetProcessor.h
index 2214e59..9837f61 100644
--- a/iocore/net/P_SSLNetProcessor.h
+++ b/iocore/net/P_SSLNetProcessor.h
@@ -35,8 +35,8 @@
   I think I will stop here for now.
 
  ****************************************************************************/
-#ifndef __P_SSLNETPROCESSOR_H
-#define __P_SSLNETPROCESSOR_H
+
+#pragma once
 
 #include "ts/ink_platform.h"
 #include "P_Net.h"
@@ -74,5 +74,3 @@ public:
 };
 
 extern SSLNetProcessor ssl_NetProcessor;
-
-#endif
diff --git a/mgmt/Alarms.h b/mgmt/Alarms.h
index ca6bec0..229df0f 100644
--- a/mgmt/Alarms.h
+++ b/mgmt/Alarms.h
@@ -32,8 +32,7 @@
  *
  */
 
-#ifndef _ALARMS_H
-#define _ALARMS_H
+#pragma once
 
 #include <cstdlib>
 #include <cstdio>
@@ -137,5 +136,3 @@ private:
   int alarmOEMcount;
 
 }; /* End class Alarms */
-
-#endif /* _ALARMS_H */
diff --git a/mgmt/BaseManager.h b/mgmt/BaseManager.h
index 2527cb0..238ffe5 100644
--- a/mgmt/BaseManager.h
+++ b/mgmt/BaseManager.h
@@ -31,8 +31,7 @@
  *
  */
 
-#ifndef _BASE_MANAGER_H
-#define _BASE_MANAGER_H
+#pragma once
 
 #include "ts/ink_thread.h"
 #include "ts/ink_mutex.h"
@@ -132,5 +131,3 @@ protected:
 
 private:
 }; /* End class BaseManager */
-
-#endif /* _BASE_MANAGER_H */
diff --git a/mgmt/LocalManager.h b/mgmt/LocalManager.h
index b0e8761..4cc5257 100644
--- a/mgmt/LocalManager.h
+++ b/mgmt/LocalManager.h
@@ -31,8 +31,7 @@
  *
  */
 
-#ifndef _LOCAL_MANAGER_H
-#define _LOCAL_MANAGER_H
+#pragma once
 
 #include "Alarms.h"
 #include "BaseManager.h"
@@ -144,5 +143,3 @@ private:
 }; /* End class LocalManager */
 
 extern LocalManager *lmgmt;
-
-#endif /* _LOCAL_MANAGER_H */
diff --git a/mgmt/MgmtDefs.h b/mgmt/MgmtDefs.h
index 52b52be..64b7109 100644
--- a/mgmt/MgmtDefs.h
+++ b/mgmt/MgmtDefs.h
@@ -31,8 +31,7 @@
  *
  */
 
-#ifndef _MGMT_DEFS_H
-#define _MGMT_DEFS_H
+#pragma once
 
 /*
  * Type definitions.
@@ -62,5 +61,3 @@ typedef enum {
 typedef void *(*MgmtCallback)(void *opaque_cb_data, char *data_raw, int data_len);
 
 #define LM_CONNECTION_SERVER "processerver.sock"
-
-#endif /* _MGMT_DEFS_H */
diff --git a/mgmt/ProcessManager.h b/mgmt/ProcessManager.h
index b3b2120..e1e0178 100644
--- a/mgmt/ProcessManager.h
+++ b/mgmt/ProcessManager.h
@@ -33,8 +33,7 @@
  *
  */
 
-#ifndef _PROCESS_MANAGER_H
-#define _PROCESS_MANAGER_H
+#pragma once
 
 #include "MgmtUtils.h"
 #include "BaseManager.h"
@@ -106,5 +105,3 @@ private:
 };
 
 inkcoreapi extern ProcessManager *pmgmt;
-
-#endif /* _PROCESS_MANAGER_H */
diff --git a/mgmt/api/TSControlMain.h b/mgmt/api/TSControlMain.h
index 3a0d3e1..d7b17b8 100644
--- a/mgmt/api/TSControlMain.h
+++ b/mgmt/api/TSControlMain.h
@@ -30,8 +30,7 @@
  *
  ***************************************************************************/
 
-#ifndef TS_CONTROL_MAIN_H
-#define TS_CONTROL_MAIN_H
+#pragma once
 
 #include "mgmtapi.h"
 
@@ -41,5 +40,3 @@ typedef struct {
 } ClientT;
 
 void *ts_ctrl_main(void *arg);
-
-#endif
diff --git a/mgmt/utils/MgmtUtils.h b/mgmt/utils/MgmtUtils.h
index c2512e6..66a7354 100644
--- a/mgmt/utils/MgmtUtils.h
+++ b/mgmt/utils/MgmtUtils.h
@@ -31,8 +31,7 @@
  *
  */
 
-#ifndef _MGMT_UTILS_H
-#define _MGMT_UTILS_H
+#pragma once
 
 #include "ts/ink_platform.h"
 #include "ts/Diags.h"
@@ -61,5 +60,3 @@ void mgmt_fatal(const int lerrno, const char *message_format, ...) TS_NORETURN;
 
 void mgmt_sleep_sec(int);
 void mgmt_sleep_msec(int);
-
-#endif /* _MGMT_UTILS_H */
diff --git a/plugins/compress/debug_macros.h b/plugins/compress/debug_macros.h
index 446461f..040e2d3 100644
--- a/plugins/compress/debug_macros.h
+++ b/plugins/compress/debug_macros.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _DBG_MACROS_H
-#define _DBG_MACROS_H
+#pragma once
 
 #include <ts/ts.h>
 
@@ -55,5 +54,3 @@
     TSDebug(TAG, "[%s:%d] [%s] ERROR: " fmt, __FILE__, __LINE__, __FUNCTION__, ##args); \
     exit(-1);                                                                           \
   } while (0)
-
-#endif //_DBG_MACROS_H
diff --git a/plugins/esi/fetcher/FetchedDataProcessor.h b/plugins/esi/fetcher/FetchedDataProcessor.h
index 316693b..c30ac7d 100644
--- a/plugins/esi/fetcher/FetchedDataProcessor.h
+++ b/plugins/esi/fetcher/FetchedDataProcessor.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _FETCHED_DATA_PROCESSOR_H
-
-#define _FETCHED_DATA_PROCESSOR_H
+#pragma once
 
 class FetchedDataProcessor
 {
@@ -34,5 +32,3 @@ public:
 
   virtual ~FetchedDataProcessor(){};
 };
-
-#endif
diff --git a/plugins/esi/fetcher/HttpDataFetcher.h b/plugins/esi/fetcher/HttpDataFetcher.h
index 9e9e507..e3a3655 100644
--- a/plugins/esi/fetcher/HttpDataFetcher.h
+++ b/plugins/esi/fetcher/HttpDataFetcher.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _HTTP_DATA_FETCHER_H
-#define _HTTP_DATA_FETCHER_H
+#pragma once
 
 #include <string>
 
@@ -83,5 +82,3 @@ public:
 
   virtual ~HttpDataFetcher(){};
 };
-
-#endif
diff --git a/plugins/esi/fetcher/HttpDataFetcherImpl.h b/plugins/esi/fetcher/HttpDataFetcherImpl.h
index 45bfbd4..d8a7fb7 100644
--- a/plugins/esi/fetcher/HttpDataFetcherImpl.h
+++ b/plugins/esi/fetcher/HttpDataFetcherImpl.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _HTTP_DATA_FETCHER_IMPL_H
-#define _HTTP_DATA_FETCHER_IMPL_H
+#pragma once
 
 #include <string>
 #include <list>
@@ -162,5 +161,3 @@ HttpDataFetcherImpl::ResponseData::set(const char *c, int clen, TSMBuffer b, TSM
   hdr_loc     = loc;
   status      = s;
 }
-
-#endif
diff --git a/plugins/esi/lib/Attribute.h b/plugins/esi/lib/Attribute.h
index e8d25b0..c30af6a 100644
--- a/plugins/esi/lib/Attribute.h
+++ b/plugins/esi/lib/Attribute.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_ATTRIBUTE_H
-#define _ESI_ATTRIBUTE_H
+#pragma once
 
 #include <list>
 
@@ -39,5 +38,3 @@ struct Attribute {
 
 typedef std::list<Attribute> AttributeList;
 }; // namespace EsiLib
-
-#endif // _ESI_ATTRIBUTE_H
diff --git a/plugins/esi/lib/ComponentBase.h b/plugins/esi/lib/ComponentBase.h
index b6d6cc2..db931ae 100644
--- a/plugins/esi/lib/ComponentBase.h
+++ b/plugins/esi/lib/ComponentBase.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_COMPONENT_BASE_H
-#define _ESI_COMPONENT_BASE_H
+#pragma once
 
 #include <cstdio>
 #include <string>
@@ -51,5 +50,3 @@ protected:
   virtual ~ComponentBase(){};
 };
 }; // namespace EsiLib
-
-#endif // _ESI_COMPONENT_BASE_H
diff --git a/plugins/esi/lib/DocNode.h b/plugins/esi/lib/DocNode.h
index 824f904..c261b79 100644
--- a/plugins/esi/lib/DocNode.h
+++ b/plugins/esi/lib/DocNode.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _FETCHER_DOC_NODE_H
-#define _FETCHER_DOC_NODE_H
+#pragma once
 
 #include <cstdint>
 #include <list>
@@ -110,5 +109,3 @@ private:
   static const char DOCNODE_VERSION = 1;
 };
 }; // namespace EsiLib
-
-#endif // _FETCHER_DOC_NODE_H
diff --git a/plugins/esi/lib/EsiGunzip.h b/plugins/esi/lib/EsiGunzip.h
index b01cd9f..f1b8498 100644
--- a/plugins/esi/lib/EsiGunzip.h
+++ b/plugins/esi/lib/EsiGunzip.h
@@ -21,10 +21,10 @@
   limitations under the License.
  */
 
-#ifndef _ESI_GUNZIP_H
-#define _ESI_GUNZIP_H
+#pragma once
 
 #include "ComponentBase.h"
+
 #include <zlib.h>
 #include <string>
 
@@ -53,5 +53,3 @@ private:
   bool _init;
   bool _success;
 };
-
-#endif // _ESI_GUNZIP_H
diff --git a/plugins/esi/lib/EsiGzip.h b/plugins/esi/lib/EsiGzip.h
index 0c6bad2..3fe9b1f 100644
--- a/plugins/esi/lib/EsiGzip.h
+++ b/plugins/esi/lib/EsiGzip.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_GZIP_H
-#define _ESI_GZIP_H
+#pragma once
 
 #include "ComponentBase.h"
 #include <zlib.h>
@@ -52,5 +51,3 @@ private:
   z_stream _zstrm;
   uLong _crc;
 };
-
-#endif // _ESI_GZIP_H
diff --git a/plugins/esi/lib/EsiParser.h b/plugins/esi/lib/EsiParser.h
index 4238528..eb856d5 100644
--- a/plugins/esi/lib/EsiParser.h
+++ b/plugins/esi/lib/EsiParser.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_PARSER_H
-#define _ESI_PARSER_H
+#pragma once
 
 #include <string>
 
@@ -146,5 +145,3 @@ private:
   inline void _adjustPointers(EsiLib::DocNodeList::iterator node_iter, EsiLib::DocNodeList::iterator end, const char *ext_data_ptr,
                               const char *int_data_start) const;
 };
-
-#endif // _ESI_PARSER_H
diff --git a/plugins/esi/lib/EsiProcessor.h b/plugins/esi/lib/EsiProcessor.h
index f5b0822..897d265 100644
--- a/plugins/esi/lib/EsiProcessor.h
+++ b/plugins/esi/lib/EsiProcessor.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_PROCESSOR_H
-#define _ESI_PROCESSOR_H
+#pragma once
 
 #include <string>
 #include <map>
@@ -185,5 +184,3 @@ private:
     _curr_state = ERRORED;
   }
 };
-
-#endif // _ESI_PROCESSOR_H
diff --git a/plugins/esi/lib/Expression.h b/plugins/esi/lib/Expression.h
index af7a8f1..318b039 100644
--- a/plugins/esi/lib/Expression.h
+++ b/plugins/esi/lib/Expression.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_EXPRESSION_H
-
-#define _ESI_EXPRESSION_H
+#pragma once
 
 #include <string>
 #include <cstdlib>
@@ -119,5 +117,3 @@ private:
   inline bool _evalSimpleExpr(const char *expr, int expr_len);
 };
 }; // namespace EsiLib
-
-#endif // _ESI_EXPRESSION_H
diff --git a/plugins/esi/lib/FailureInfo.h b/plugins/esi/lib/FailureInfo.h
index 3140576..ba8e61e 100644
--- a/plugins/esi/lib/FailureInfo.h
+++ b/plugins/esi/lib/FailureInfo.h
@@ -21,12 +21,13 @@
   limitations under the License.
  */
 
-#ifndef FAILURE_INFO_H
-#define FAILURE_INFO_H
+#pragma once
+
 #include <ctime>
 #include <vector>
 #include <map>
 #include <sys/time.h>
+
 #if defined(solaris) && !defined(timersub)
 #define timersub(a, b, result)                       \
   do {                                               \
@@ -38,9 +39,12 @@
     }                                                \
   } while (0)
 #endif
+
 #include <string>
 #include <pthread.h>
+
 #include "ComponentBase.h"
+
 using namespace std;
 
 typedef std::vector<std::pair<double, double>> FailureToSuccess;
@@ -106,5 +110,3 @@ public:
   /*Was a reqeust made*/
   bool _requestMade;
 };
-
-#endif
diff --git a/plugins/esi/lib/HandlerManager.h b/plugins/esi/lib/HandlerManager.h
index 77f0a30..607027b 100644
--- a/plugins/esi/lib/HandlerManager.h
+++ b/plugins/esi/lib/HandlerManager.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _HANDLER_MANAGER_H
-
-#define _HANDLER_MANAGER_H
+#pragma once
 
 #include <string>
 #include <map>
@@ -66,5 +64,3 @@ private:
   static const char *const FACTORY_FUNCTION_NAME;
 };
 }; // namespace EsiLib
-
-#endif
diff --git a/plugins/esi/lib/HttpHeader.h b/plugins/esi/lib/HttpHeader.h
index 5d75b05..bfce024 100644
--- a/plugins/esi/lib/HttpHeader.h
+++ b/plugins/esi/lib/HttpHeader.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_HTTP_HEADER_H
-
-#define _ESI_HTTP_HEADER_H
+#pragma once
 
 #include <list>
 
@@ -40,5 +38,3 @@ struct HttpHeader {
 
 typedef std::list<HttpHeader> HttpHeaderList;
 }; // namespace EsiLib
-
-#endif // _ESI_HTTP_HEADER_H
diff --git a/plugins/esi/lib/IncludeHandlerFactory.h b/plugins/esi/lib/IncludeHandlerFactory.h
index 8395bbe..4d992e1 100644
--- a/plugins/esi/lib/IncludeHandlerFactory.h
+++ b/plugins/esi/lib/IncludeHandlerFactory.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _INCLUDE_HANDLER_FACTORY_H
-
-#define _INCLUDE_HANDLER_FACTORY_H
+#pragma once
 
 #include <string>
 #include "SpecialIncludeHandler.h"
@@ -44,5 +42,3 @@ namespace EsiLib
 typedef SpecialIncludeHandler *(*SpecialIncludeHandlerCreator)(Variables &esi_vars, Expression &esi_expr, HttpDataFetcher &fetcher,
                                                                const std::string &id);
 };
-
-#endif
diff --git a/plugins/esi/lib/Stats.h b/plugins/esi/lib/Stats.h
index 64f3fa1..b033823 100644
--- a/plugins/esi/lib/Stats.h
+++ b/plugins/esi/lib/Stats.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_STATS_H
-
-#define _ESI_STATS_H
+#pragma once
 
 #include "Utils.h"
 
@@ -61,5 +59,3 @@ namespace Stats
   void increment(STAT st, int step = 1);
 }; // namespace Stats
 }; // namespace EsiLib
-
-#endif
diff --git a/plugins/esi/lib/StringHash.h b/plugins/esi/lib/StringHash.h
index 16cfc1e..20df598 100644
--- a/plugins/esi/lib/StringHash.h
+++ b/plugins/esi/lib/StringHash.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _STRING_HASH_H
-
-#define _STRING_HASH_H
+#pragma once
 
 #include <string>
 #include <ext/hash_map>
@@ -44,5 +42,3 @@ template <typename T> class StringKeyHash : public __gnu_cxx::hash_map<std::stri
 {
 };
 }; // namespace EsiLib
-
-#endif // _STRING_HASH_H
diff --git a/plugins/esi/lib/Utils.h b/plugins/esi/lib/Utils.h
index 39b68af..c7c4125 100644
--- a/plugins/esi/lib/Utils.h
+++ b/plugins/esi/lib/Utils.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_UTILS_H
-
-#define _ESI_UTILS_H
+#pragma once
 
 #include "DocNode.h"
 #include "ComponentBase.h"
@@ -126,5 +124,3 @@ namespace Utils
   }
 }; // namespace Utils
 }; // namespace EsiLib
-
-#endif
diff --git a/plugins/esi/lib/Variables.h b/plugins/esi/lib/Variables.h
index 6d93c70..18fb845 100644
--- a/plugins/esi/lib/Variables.h
+++ b/plugins/esi/lib/Variables.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_VARIABLES_H
-
-#define _ESI_VARIABLES_H
+#pragma once
 
 #include <list>
 
@@ -179,5 +177,3 @@ private:
   const std::string &_getSubCookieValue(const std::string &cookie_str, size_t cookie_part_divider) const;
 };
 }; // namespace EsiLib
-
-#endif // _ESI_VARIABLES_H
diff --git a/plugins/esi/lib/gzip.h b/plugins/esi/lib/gzip.h
index e170caa..35814a4 100644
--- a/plugins/esi/lib/gzip.h
+++ b/plugins/esi/lib/gzip.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _GZIP_H
-
-#define _GZIP_H
+#pragma once
 
 #include <string>
 #include <list>
@@ -65,5 +63,3 @@ typedef std::list<std::string> BufferList;
 
 bool gunzip(const char *data, int data_len, BufferList &buf_list);
 } // namespace EsiLib
-
-#endif // _GZIP_H
diff --git a/plugins/esi/serverIntercept.h b/plugins/esi/serverIntercept.h
index 0e4145f..971470b 100644
--- a/plugins/esi/serverIntercept.h
+++ b/plugins/esi/serverIntercept.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _ESI_SERVER_INTERCEPT_H
-
-#define _ESI_SERVER_INTERCEPT_H
+#pragma once
 
 #include "ts/ts.h"
 
@@ -34,5 +32,3 @@ extern const char *SERVER_INTERCEPT_HEADER;
 
 extern const int ECHO_HEADER_PREFIX_LEN;
 extern const int SERVER_INTERCEPT_HEADER_LEN;
-
-#endif
diff --git a/plugins/esi/test/HandlerMap.h b/plugins/esi/test/HandlerMap.h
index faaf669..4fb5b0f 100644
--- a/plugins/esi/test/HandlerMap.h
+++ b/plugins/esi/test/HandlerMap.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _HANDLER_MAP_H
-
-#define _HANDLER_MAP_H
+#pragma once
 
 #include <string>
 #include <map>
@@ -33,5 +31,3 @@
 typedef std::map<std::string, StubIncludeHandler *> HandlerMap;
 
 extern HandlerMap gHandlerMap;
-
-#endif
diff --git a/plugins/esi/test/StubIncludeHandler.h b/plugins/esi/test/StubIncludeHandler.h
index 67c6f4a..1b22e29 100644
--- a/plugins/esi/test/StubIncludeHandler.h
+++ b/plugins/esi/test/StubIncludeHandler.h
@@ -21,9 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _STUB_INCLUDE_HANDLER_H
-
-#define _STUB_INCLUDE_HANDLER_H
+#pragma once
 
 #include <list>
 #include "SpecialIncludeHandler.h"
@@ -58,5 +56,3 @@ private:
   int n_includes;
   std::list<char *> heap_strings;
 };
-
-#endif
diff --git a/plugins/esi/test/TestHttpDataFetcher.h b/plugins/esi/test/TestHttpDataFetcher.h
index 4a0d560..9eecd09 100644
--- a/plugins/esi/test/TestHttpDataFetcher.h
+++ b/plugins/esi/test/TestHttpDataFetcher.h
@@ -21,8 +21,7 @@
   limitations under the License.
  */
 
-#ifndef _TEST_HTTP_DATA_FETCHER_H
-#define _TEST_HTTP_DATA_FETCHER_H
+#pragma once
 
 #include <string>
 
@@ -89,5 +88,3 @@ private:
   std::string _data;
   bool _return_data;
 };
-
-#endif
diff --git a/plugins/esi/test/print_funcs.h b/plugins/esi/test/print_funcs.h
index 81b6383..5aa0c7d 100644
--- a/plugins/esi/test/print_funcs.h
+++ b/plugins/esi/test/print_funcs.h
@@ -21,11 +21,8 @@
   limitations under the License.
  */
 
-#ifndef _PRINT_FUNCS_H
-#define _PRINT_FUNCS_H
+#pragma once
 
 void Debug(const char *tag, const char *fmt, ...);
 
 void Error(const char *fmt, ...);
-
-#endif // _PRINT_FUNCS_H
diff --git a/plugins/experimental/inliner/cache-handler.h b/plugins/experimental/inliner/cache-handler.h
index 1e4dc00..75126c5 100644
--- a/plugins/experimental/inliner/cache-handler.h
+++ b/plugins/experimental/inliner/cache-handler.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef CACHE_HANDLER_H
-#define CACHE_HANDLER_H
+
+#pragma once
 
 #include <algorithm>
 #include <iostream>
@@ -338,5 +338,3 @@ namespace inliner
 } // namespace ats
 
 #undef ONE_PIXEL
-
-#endif // CACHE_HANDLER_H
diff --git a/plugins/experimental/inliner/cache.h b/plugins/experimental/inliner/cache.h
index b4d98b9..3e902b5 100644
--- a/plugins/experimental/inliner/cache.h
+++ b/plugins/experimental/inliner/cache.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef CACHE_H
-#define CACHE_H
+
+#pragma once
 
 #include <cassert>
 #include <string>
@@ -120,4 +120,3 @@ namespace cache
 
 } // namespace cache
 } // namespace ats
-#endif // CACHE_H
diff --git a/plugins/experimental/inliner/chunk-decoder.h b/plugins/experimental/inliner/chunk-decoder.h
index 11ad6c1..346fe53 100644
--- a/plugins/experimental/inliner/chunk-decoder.h
+++ b/plugins/experimental/inliner/chunk-decoder.h
@@ -40,8 +40,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef CHUNK_DECODER_H
-#define CHUNK_DECODER_H
+
+#pragma once
 
 #include <ts/ts.h>
 #include <cinttypes>
@@ -82,5 +82,3 @@ public:
     return state_ == State::kEnd;
   }
 };
-
-#endif // CHUNK_DECODER_H
diff --git a/plugins/experimental/inliner/fetcher.h b/plugins/experimental/inliner/fetcher.h
index 14f842d..36e3fe4 100644
--- a/plugins/experimental/inliner/fetcher.h
+++ b/plugins/experimental/inliner/fetcher.h
@@ -40,8 +40,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef FETCHER_H
-#define FETCHER_H
+
+#pragma once
 
 #include <arpa/inet.h>
 #include <cstring>
@@ -329,5 +329,3 @@ get(io::IO *const i, const int64_t l, const T &t, const int64_t ti = 0)
   return get("127.0.0.1", i, l, t, ti);
 }
 } // namespace ats
-
-#endif // FETCHER_H
diff --git a/plugins/experimental/inliner/gif.h b/plugins/experimental/inliner/gif.h
index 62f3c98..218e26a 100644
--- a/plugins/experimental/inliner/gif.h
+++ b/plugins/experimental/inliner/gif.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef GIF_H
-#define GIF_H
+
+#pragma once
 
 #include <algorithm>
 
@@ -46,5 +46,3 @@ namespace inliner
   };
 } // namespace inliner
 } // namespace ats
-
-#endif // GIF_H
diff --git a/plugins/experimental/inliner/html-parser.h b/plugins/experimental/inliner/html-parser.h
index c68f615..e203fa9 100644
--- a/plugins/experimental/inliner/html-parser.h
+++ b/plugins/experimental/inliner/html-parser.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef HTML_PARSER_H
-#define HTML_PARSER_H
+
+#pragma once
 
 #include <cstdint>
 #include <memory>
@@ -143,5 +143,3 @@ namespace inliner
 
 } // namespace inliner
 } // namespace ats
-
-#endif // HTML_PARSER_H
diff --git a/plugins/experimental/inliner/inliner-handler.h b/plugins/experimental/inliner/inliner-handler.h
index 4839d90..af1fece 100644
--- a/plugins/experimental/inliner/inliner-handler.h
+++ b/plugins/experimental/inliner/inliner-handler.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef INLINER_HANDLER_H
-#define INLINER_HANDLER_H
+
+#pragma once
 
 #include <string>
 #include <memory>
@@ -69,5 +69,3 @@ namespace inliner
 
 } // namespace inliner
 } // namespace ats
-
-#endif // INLINER_HANDLER_H
diff --git a/plugins/experimental/inliner/jpeg.h b/plugins/experimental/inliner/jpeg.h
index eb197b1..b24c064 100644
--- a/plugins/experimental/inliner/jpeg.h
+++ b/plugins/experimental/inliner/jpeg.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef JPEG_H
-#define JPEG_H
+
+#pragma once
 
 #include <algorithm>
 
@@ -43,5 +43,3 @@ namespace inliner
   };
 } // namespace inliner
 } // namespace ats
-
-#endif // JPEG_H
diff --git a/plugins/experimental/inliner/png.h b/plugins/experimental/inliner/png.h
index f726604..6c0db40 100644
--- a/plugins/experimental/inliner/png.h
+++ b/plugins/experimental/inliner/png.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef PNG_H
-#define PNG_H
+
+#pragma once
 
 #include <algorithm>
 #include <exception>
@@ -120,5 +120,3 @@ namespace inliner
   // const uint32_t PNG::HEADER_SIZE = 8;
 } // namespace inliner
 } // namespace ats
-
-#endif // PNG_H
diff --git a/plugins/experimental/inliner/ts.h b/plugins/experimental/inliner/ts.h
index 42dc7b5..a09f102 100644
--- a/plugins/experimental/inliner/ts.h
+++ b/plugins/experimental/inliner/ts.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef TS_H
-#define TS_H
+
+#pragma once
 
 #include <cassert>
 #include <limits>
@@ -325,5 +325,3 @@ namespace io
 
 } // namespace io
 } // namespace ats
-
-#endif // TS_H
diff --git a/plugins/experimental/inliner/util.h b/plugins/experimental/inliner/util.h
index 2dce1ed..68caff0 100644
--- a/plugins/experimental/inliner/util.h
+++ b/plugins/experimental/inliner/util.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef UTIL_H
-#define UTIL_H
+
+#pragma once
 
 #include <vector>
 
@@ -38,5 +38,3 @@ namespace util
 {
 typedef std::vector<char> Buffer;
 } // namespace util
-
-#endif // UTIL_H
diff --git a/plugins/experimental/inliner/vconnection.h b/plugins/experimental/inliner/vconnection.h
index 537508b..cb9e51f 100644
--- a/plugins/experimental/inliner/vconnection.h
+++ b/plugins/experimental/inliner/vconnection.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef VCONNECTION_H
-#define VCONNECTION_H
+
+#pragma once
 
 #include <cassert>
 
@@ -101,5 +101,3 @@ namespace io
   } // namespace vconnection
 } // namespace io
 } // namespace ats
-
-#endif // VCONNECTION_H
diff --git a/plugins/experimental/memcache/protocol_binary.h b/plugins/experimental/memcache/protocol_binary.h
index bb80489..1f49d14 100644
--- a/plugins/experimental/memcache/protocol_binary.h
+++ b/plugins/experimental/memcache/protocol_binary.h
@@ -32,8 +32,7 @@
  * Author: Trond Norbye <tr...@sun.com>
  */
 
-#ifndef PROTOCOL_BINARY_H
-#define PROTOCOL_BINARY_H
+#pragma once
 
 /**
  * This file contains definitions of the constants and packet formats
@@ -412,4 +411,3 @@ typedef protocol_binary_request_rangeop protocol_binary_request_rdecrq;
 #ifdef __cplusplus
 }
 #endif
-#endif /* PROTOCOL_BINARY_H */
diff --git a/plugins/experimental/money_trace/money_trace.h b/plugins/experimental/money_trace/money_trace.h
index 6f2b015..88af66b 100644
--- a/plugins/experimental/money_trace/money_trace.h
+++ b/plugins/experimental/money_trace/money_trace.h
@@ -17,8 +17,7 @@
  * under the License.
  */
 
-#ifndef __MONEY_TRACE_H
-#define __MONEY_TRACE_H
+#pragma once
 
 #include <random>
 #include <ctime>
@@ -65,5 +64,3 @@ static void mt_check_request_header(TSHttpTxn txnp);
 static void mt_send_client_response(TSHttpTxn txnp, struct txndata *txn_data);
 static void mt_send_server_request(TSHttpTxn txnp, struct txndata *txn_data);
 static int transaction_handler(TSCont contp, TSEvent event, void *edata);
-
-#endif
diff --git a/plugins/experimental/mp4/mp4_common.h b/plugins/experimental/mp4/mp4_common.h
index df821ea..126e444 100644
--- a/plugins/experimental/mp4/mp4_common.h
+++ b/plugins/experimental/mp4/mp4_common.h
@@ -16,8 +16,7 @@
   limitations under the License.
 */
 
-#ifndef _MP4_COMMON_H
-#define _MP4_COMMON_H
+#pragma once
 
 #include <cstring>
 #include <cstdlib>
@@ -121,5 +120,3 @@ public:
 
   bool transform_added;
 };
-
-#endif
diff --git a/plugins/experimental/mp4/mp4_meta.h b/plugins/experimental/mp4/mp4_meta.h
index a85df5d..1e8d1b1 100644
--- a/plugins/experimental/mp4/mp4_meta.h
+++ b/plugins/experimental/mp4/mp4_meta.h
@@ -16,8 +16,7 @@
   limitations under the License.
 */
 
-#ifndef _MP4_META_H
-#define _MP4_META_H
+#pragma once
 
 #include <cstring>
 #include <cstdlib>
@@ -530,5 +529,3 @@ public:
   u_char mdat_atom_header[16];
   bool meta_complete;
 };
-
-#endif
diff --git a/plugins/experimental/multiplexer/chunk-decoder.h b/plugins/experimental/multiplexer/chunk-decoder.h
index f950a45..0cfb464 100644
--- a/plugins/experimental/multiplexer/chunk-decoder.h
+++ b/plugins/experimental/multiplexer/chunk-decoder.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef CHUNK_DECODER_H
-#define CHUNK_DECODER_H
+
+#pragma once
 
 #include <ts/ts.h>
 #include <cinttypes>
@@ -63,5 +63,3 @@ public:
     return state_ == State::kEnd;
   }
 };
-
-#endif // CHUNK_DECODER_H
diff --git a/plugins/experimental/multiplexer/dispatch.h b/plugins/experimental/multiplexer/dispatch.h
index 33bf60e..35b0e6e 100644
--- a/plugins/experimental/multiplexer/dispatch.h
+++ b/plugins/experimental/multiplexer/dispatch.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef DISPATCH_H
-#define DISPATCH_H
+
+#pragma once
 
 #include <cassert>
 #include <memory>
@@ -70,5 +70,3 @@ extern size_t timeout;
 void generateRequests(const Origins &, const TSMBuffer, const TSMLoc, Requests &);
 void addBody(Requests &, const TSIOBufferReader);
 void dispatch(Requests &, const int timeout = 0);
-
-#endif // DISPATCH_H
diff --git a/plugins/experimental/multiplexer/fetcher.h b/plugins/experimental/multiplexer/fetcher.h
index 43423d0..4bc97a1 100644
--- a/plugins/experimental/multiplexer/fetcher.h
+++ b/plugins/experimental/multiplexer/fetcher.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef NEW_FETCHER_H
-#define NEW_FETCHER_H
+
+#pragma once
 
 #include <arpa/inet.h>
 #include <iostream>
@@ -307,5 +307,3 @@ get(io::IO *const i, const int64_t l, const T &t, const int64_t ti = 0)
   return get("127.0.0.1", i, l, t, ti);
 }
 } // namespace ats
-
-#endif // NEW_FETCHER_H
diff --git a/plugins/experimental/multiplexer/original-request.h b/plugins/experimental/multiplexer/original-request.h
index 3325724..fd3b313 100644
--- a/plugins/experimental/multiplexer/original-request.h
+++ b/plugins/experimental/multiplexer/original-request.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef ORIGINAL_REQUEST_H
-#define ORIGINAL_REQUEST_H
+
+#pragma once
 
 #include <cassert>
 #include <string>
@@ -59,5 +59,3 @@ public:
   void hostHeader(const std::string &);
   bool xMultiplexerHeader(const std::string &);
 };
-
-#endif // ORIGINAL_REQUEST_H
diff --git a/plugins/experimental/multiplexer/post.h b/plugins/experimental/multiplexer/post.h
index dfc7be5..9534e8d 100644
--- a/plugins/experimental/multiplexer/post.h
+++ b/plugins/experimental/multiplexer/post.h
@@ -20,8 +20,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef POST_H
-#define POST_H
+
+#pragma once
 
 #include <ts/ts.h>
 
@@ -39,5 +39,3 @@ struct PostState {
 };
 
 int handlePost(TSCont, TSEvent, void *);
-
-#endif // POST_H
diff --git a/plugins/experimental/multiplexer/ts.h b/plugins/experimental/multiplexer/ts.h
index a1aa7cf..1e4f654 100644
--- a/plugins/experimental/multiplexer/ts.h
+++ b/plugins/experimental/multiplexer/ts.h
@@ -20,8 +20,9 @@
   See the License for the specific language governing permissions and
   limitations under the License.
  */
-#ifndef TS_H
-#define TS_H
+
+#pragma once
+
 #include <cassert>
 #include <cstring>
 #include <limits>
@@ -64,4 +65,3 @@ namespace io
 
 } // namespace io
 } // namespace ats
-#endif // TS_H
diff --git a/plugins/lua/ts_lua_cached_response.h b/plugins/lua/ts_lua_cached_response.h
index 82102fc..7d0bb4c 100644
--- a/plugins/lua/ts_lua_cached_response.h
+++ b/plugins/lua/ts_lua_cached_response.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_CACHED_RESPONSE_H
-#define _TS_LUA_CACHED_RESPONSE_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_cached_response_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_client_request.h b/plugins/lua/ts_lua_client_request.h
index bd5ac19..9c353c3 100644
--- a/plugins/lua/ts_lua_client_request.h
+++ b/plugins/lua/ts_lua_client_request.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_CLIENT_REQUEST_H
-#define _TS_LUA_CLIENT_REQUEST_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_client_request_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_client_response.h b/plugins/lua/ts_lua_client_response.h
index b239cee..f55ea44 100644
--- a/plugins/lua/ts_lua_client_response.h
+++ b/plugins/lua/ts_lua_client_response.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_CLIENT_RESPONSE_H
-#define _TS_LUA_CLIENT_RESPONSE_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_client_response_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_common.h b/plugins/lua/ts_lua_common.h
index fd55b96..e355e03 100644
--- a/plugins/lua/ts_lua_common.h
+++ b/plugins/lua/ts_lua_common.h
@@ -16,8 +16,7 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_COMMON_H
-#define _TS_LUA_COMMON_H
+#pragma once
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -175,5 +174,3 @@ typedef struct {
       ih->buffer = NULL;                \
     }                                   \
   } while (0)
-
-#endif
diff --git a/plugins/lua/ts_lua_constant.h b/plugins/lua/ts_lua_constant.h
index c0dcb27..80d77cc 100644
--- a/plugins/lua/ts_lua_constant.h
+++ b/plugins/lua/ts_lua_constant.h
@@ -16,9 +16,6 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_CONSTANT_H
-#define _TS_LUA_CONSTANT_H
+#pragma once
 
 void ts_lua_inject_constant_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_context.h b/plugins/lua/ts_lua_context.h
index 332d50b..fb3a8d2 100644
--- a/plugins/lua/ts_lua_context.h
+++ b/plugins/lua/ts_lua_context.h
@@ -16,12 +16,9 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_CONTEXT_H
-#define _TS_LUA_CONTEXT_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_context_api(lua_State *L);
 void ts_lua_create_context_table(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_coroutine.h b/plugins/lua/ts_lua_coroutine.h
index ca8bece..831066d 100644
--- a/plugins/lua/ts_lua_coroutine.h
+++ b/plugins/lua/ts_lua_coroutine.h
@@ -16,10 +16,10 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_COROUTINE_H
-#define _TS_LUA_COROUTINE_H
+#pragma once
 
 #include <stdio.h>
+
 #include "lua.h"
 #include "lualib.h"
 #include "lauxlib.h"
@@ -64,5 +64,3 @@ typedef struct async_item {
 
 ts_lua_async_item *ts_lua_async_create_item(TSCont cont, async_clean func, void *d, ts_lua_cont_info *ci);
 void ts_lua_release_cont_info(ts_lua_cont_info *ci);
-
-#endif
diff --git a/plugins/lua/ts_lua_crypto.h b/plugins/lua/ts_lua_crypto.h
index a797974..32eebf1 100644
--- a/plugins/lua/ts_lua_crypto.h
+++ b/plugins/lua/ts_lua_crypto.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_CRYPTO_H
-#define _TS_LUA_CRYPTO_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_crypto_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_fetch.h b/plugins/lua/ts_lua_fetch.h
index 4c6394a..04c0d47 100644
--- a/plugins/lua/ts_lua_fetch.h
+++ b/plugins/lua/ts_lua_fetch.h
@@ -16,8 +16,7 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_FETCH_H
-#define _TS_LUA_FETCH_H
+#pragma once
 
 #include "ts_lua_common.h"
 
@@ -44,5 +43,3 @@ typedef struct fetch_multi_info {
 } ts_lua_fetch_multi_info;
 
 void ts_lua_inject_fetch_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_hook.h b/plugins/lua/ts_lua_hook.h
index c6cd74c..88367ae 100644
--- a/plugins/lua/ts_lua_hook.h
+++ b/plugins/lua/ts_lua_hook.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_HOOK_H
-#define _TS_LUA_HOOK_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_hook_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_http.h b/plugins/lua/ts_lua_http.h
index 5e72286..e28ceed 100644
--- a/plugins/lua/ts_lua_http.h
+++ b/plugins/lua/ts_lua_http.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_HTTP_H
-#define _TS_LUA_HTTP_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_http_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_http_cntl.h b/plugins/lua/ts_lua_http_cntl.h
index e4d813b..a87dfdf 100644
--- a/plugins/lua/ts_lua_http_cntl.h
+++ b/plugins/lua/ts_lua_http_cntl.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_HTTP_CNTL_H
-#define _TS_LUA_HTTP_CNTL_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_http_cntl_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_http_config.h b/plugins/lua/ts_lua_http_config.h
index 6df634d..adff196 100644
--- a/plugins/lua/ts_lua_http_config.h
+++ b/plugins/lua/ts_lua_http_config.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_HTTP_CONFIG_H
-#define _TS_LUA_HTTP_CONFIG_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_http_config_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_http_intercept.h b/plugins/lua/ts_lua_http_intercept.h
index 00f0e1b..9264322 100644
--- a/plugins/lua/ts_lua_http_intercept.h
+++ b/plugins/lua/ts_lua_http_intercept.h
@@ -16,12 +16,9 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_HTTP_INTERCEPT_H
-#define _TS_LUA_HTTP_INTERCEPT_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_http_intercept_api(lua_State *L);
 void ts_lua_inject_intercept_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_http_milestone.h b/plugins/lua/ts_lua_http_milestone.h
index 5ebe40b..3c0b333 100644
--- a/plugins/lua/ts_lua_http_milestone.h
+++ b/plugins/lua/ts_lua_http_milestone.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_HTTP_MILESTONE_H
-#define _TS_LUA_HTTP_MILESTONE_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_http_milestone_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_io.h b/plugins/lua/ts_lua_io.h
index c40bdc0..1e478c9 100644
--- a/plugins/lua/ts_lua_io.h
+++ b/plugins/lua/ts_lua_io.h
@@ -16,12 +16,9 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_IO_H
-#define _TS_LUA_IO_H
+#pragma once
 
 #include <ts/ts.h>
 #include <string.h>
 
 int64_t IOBufferReaderCopy(TSIOBufferReader readerp, void *buf, int64_t length);
-
-#endif
diff --git a/plugins/lua/ts_lua_log.h b/plugins/lua/ts_lua_log.h
index 327f3b2..851fe30 100644
--- a/plugins/lua/ts_lua_log.h
+++ b/plugins/lua/ts_lua_log.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_LOG_H
-#define _TS_LUA_LOG_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_log_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_mgmt.h b/plugins/lua/ts_lua_mgmt.h
index 6ee9cb6..b24963f 100644
--- a/plugins/lua/ts_lua_mgmt.h
+++ b/plugins/lua/ts_lua_mgmt.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_MGMT_H
-#define _TS_LUA_MGMT_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_mgmt_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_misc.h b/plugins/lua/ts_lua_misc.h
index 04b4f75..85083e9 100644
--- a/plugins/lua/ts_lua_misc.h
+++ b/plugins/lua/ts_lua_misc.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_MISC_H
-#define _TS_LUA_MISC_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_misc_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_package.h b/plugins/lua/ts_lua_package.h
index 4eabbdf..939b339 100644
--- a/plugins/lua/ts_lua_package.h
+++ b/plugins/lua/ts_lua_package.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_PACKAGE_H
-#define _TS_LUA_PACKAGE_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_package_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_remap.h b/plugins/lua/ts_lua_remap.h
index 2d2952a..13a6762 100644
--- a/plugins/lua/ts_lua_remap.h
+++ b/plugins/lua/ts_lua_remap.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_REMAP_H
-#define _TS_LUA_REMAP_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_remap_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_server_request.h b/plugins/lua/ts_lua_server_request.h
index e2df6db..0f84620 100644
--- a/plugins/lua/ts_lua_server_request.h
+++ b/plugins/lua/ts_lua_server_request.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_SERVER_REQUEST_H
-#define _TS_LUA_SERVER_REQUEST_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_server_request_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_server_response.h b/plugins/lua/ts_lua_server_response.h
index 57eddac..bf06747 100644
--- a/plugins/lua/ts_lua_server_response.h
+++ b/plugins/lua/ts_lua_server_response.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_SERVER_RESPONSE_H
-#define _TS_LUA_SERVER_RESPONSE_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_server_response_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_stat.h b/plugins/lua/ts_lua_stat.h
index c2541d2..e5bd970 100644
--- a/plugins/lua/ts_lua_stat.h
+++ b/plugins/lua/ts_lua_stat.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_STAT_H
-#define _TS_LUA_STAT_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 void ts_lua_inject_stat_api(lua_State *L);
-
-#endif
diff --git a/plugins/lua/ts_lua_string.h b/plugins/lua/ts_lua_string.h
index 02b5feb..35c5e65 100644
--- a/plugins/lua/ts_lua_string.h
+++ b/plugins/lua/ts_lua_string.h
@@ -16,8 +16,7 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_STRING_H
-#define _TS_LUA_STRING_H
+#pragma once
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -25,5 +24,3 @@
 #include <inttypes.h>
 
 u_char *ts_lua_hex_dump(u_char *dst, u_char *src, size_t len);
-
-#endif
diff --git a/plugins/lua/ts_lua_transform.h b/plugins/lua/ts_lua_transform.h
index 44070bb..f7b1e10 100644
--- a/plugins/lua/ts_lua_transform.h
+++ b/plugins/lua/ts_lua_transform.h
@@ -16,11 +16,8 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_TRANSFORM_H
-#define _TS_LUA_TRANSFORM_H
+#pragma once
 
 #include "ts_lua_common.h"
 
 int ts_lua_transform_entry(TSCont contp, TSEvent event, void *edata);
-
-#endif
diff --git a/plugins/lua/ts_lua_util.h b/plugins/lua/ts_lua_util.h
index 3a5a7b3..e0025ef 100644
--- a/plugins/lua/ts_lua_util.h
+++ b/plugins/lua/ts_lua_util.h
@@ -16,8 +16,7 @@
   limitations under the License.
 */
 
-#ifndef _TS_LUA_UTIL_H
-#define _TS_LUA_UTIL_H
+#pragma once
 
 #include "ts_lua_common.h"
 
@@ -67,5 +66,3 @@ ts_lua_http_intercept_ctx *ts_lua_get_http_intercept_ctx(lua_State *L);
 void ts_lua_destroy_http_intercept_ctx(ts_lua_http_intercept_ctx *ictx);
 
 int ts_lua_http_cont_handler(TSCont contp, TSEvent event, void *edata);
-
-#endif
diff --git a/src/traffic_cache_tool/CacheScan.h b/src/traffic_cache_tool/CacheScan.h
index 3f3efa3..3a7cdff 100644
--- a/src/traffic_cache_tool/CacheScan.h
+++ b/src/traffic_cache_tool/CacheScan.h
@@ -27,8 +27,8 @@
  * Created on April 4, 2018, 10:06 AM
  */
 
-#ifndef CACHESCAN_H
-#define CACHESCAN_H
+#pragma once
+
 #include <thread>
 #include <unordered_map>
 #include "CacheDefs.h"
@@ -61,5 +61,3 @@ public:
   bool check_url(ts::MemSpan &mem, URLImpl *url);
 };
 } // namespace ct
-
-#endif /* CACHESCAN_H */