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.
This commit is contained in:
Tom Henderson
2020-02-23 21:07:56 -08:00
parent cdea454aa3
commit da3789cc66
5 changed files with 19 additions and 5 deletions

View File

@@ -20,7 +20,8 @@
* Mohit P. Tahiliani <tahiliani@nitk.edu.in>
*
*/
#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 */

View File

@@ -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 */

View File

@@ -20,7 +20,8 @@
* Mohit P. Tahiliani <tahiliani@nitk.edu.in>
*
*/
#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 */

View File

@@ -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 */

View File

@@ -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 */