From da3789cc668c1e88387f60520413dbf43318d997 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Sun, 23 Feb 2020 21:07:56 -0800 Subject: [PATCH] tcp: Replace 'pragma once' directive with include header guards The 'pragma once' directive can interact poorly with our build system in which header files may be found in multiple directories. The previous commit regarding TCP forward declarations caused some issues on a macOS machine. --- src/internet/model/tcp-prr-recovery.h | 4 +++- src/internet/model/tcp-rate-ops.h | 5 ++++- src/internet/model/tcp-recovery-ops.h | 5 ++++- src/internet/model/tcp-socket-state.h | 5 ++++- src/internet/model/tcp-tx-item.h | 5 ++++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/internet/model/tcp-prr-recovery.h b/src/internet/model/tcp-prr-recovery.h index d0b94227d..5ee3da533 100644 --- a/src/internet/model/tcp-prr-recovery.h +++ b/src/internet/model/tcp-prr-recovery.h @@ -20,7 +20,8 @@ * Mohit P. Tahiliani * */ -#pragma once +#ifndef TCP_PRR_RECOVERY_H +#define TCP_PRR_RECOVERY_H #include "ns3/tcp-recovery-ops.h" @@ -90,3 +91,4 @@ private: }; } // namespace ns3 +#endif /* TCP_PRR_RECOVERY_H */ diff --git a/src/internet/model/tcp-rate-ops.h b/src/internet/model/tcp-rate-ops.h index 42198b286..c9a4e72cf 100644 --- a/src/internet/model/tcp-rate-ops.h +++ b/src/internet/model/tcp-rate-ops.h @@ -16,7 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#pragma once +#ifndef TCP_RATE_OPS_H +#define TCP_RATE_OPS_H #include "ns3/object.h" #include "ns3/tcp-tx-item.h" @@ -263,3 +264,5 @@ bool operator== (TcpRateLinux::TcpRateSample const & lhs, TcpRateLinux::TcpRateS bool operator== (TcpRateLinux::TcpRateConnection const & lhs, TcpRateLinux::TcpRateConnection const & rhs); } //namespace ns3 + +#endif /* TCP_RATE_OPS_H */ diff --git a/src/internet/model/tcp-recovery-ops.h b/src/internet/model/tcp-recovery-ops.h index e952087c6..df4b11448 100644 --- a/src/internet/model/tcp-recovery-ops.h +++ b/src/internet/model/tcp-recovery-ops.h @@ -20,7 +20,8 @@ * Mohit P. Tahiliani * */ -#pragma once +#ifndef TCP_RECOVERY_OPS_H +#define TCP_RECOVERY_OPS_H #include "ns3/object.h" @@ -193,3 +194,5 @@ public: }; } // namespace ns3 + +#endif /* TCP_RECOVERY_OPS_H */ diff --git a/src/internet/model/tcp-socket-state.h b/src/internet/model/tcp-socket-state.h index 686f865aa..842673b30 100644 --- a/src/internet/model/tcp-socket-state.h +++ b/src/internet/model/tcp-socket-state.h @@ -15,7 +15,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#pragma once +#ifndef TCP_SOCKET_STATE_H +#define TCP_SOCKET_STATE_H #include "ns3/object.h" #include "ns3/data-rate.h" @@ -243,3 +244,5 @@ namespace TracedValueCallback { } // namespace TracedValueCallback } //namespace ns3 + +#endif /* TCP_SOCKET_STATE_H */ diff --git a/src/internet/model/tcp-tx-item.h b/src/internet/model/tcp-tx-item.h index 01615d52e..282c46ab2 100644 --- a/src/internet/model/tcp-tx-item.h +++ b/src/internet/model/tcp-tx-item.h @@ -16,7 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ -#pragma once +#ifndef TCP_TX_ITEM_H +#define TCP_TX_ITEM_H #include "ns3/packet.h" #include "ns3/nstime.h" @@ -113,3 +114,5 @@ private: }; } //namespace ns3 + +#endif /* TCP_TX_ITEM_H */