diff --git a/cdatapack/cdatapack.h b/cdatapack/cdatapack.h --- a/cdatapack/cdatapack.h +++ b/cdatapack/cdatapack.h @@ -7,8 +7,8 @@ // cdatapack: // no-check-code -#ifndef CDATAPACK_CDATAPACK_H -#define CDATAPACK_CDATAPACK_H +#ifndef FBHGEXT_CDATAPACK_CDATAPACK_H +#define FBHGEXT_CDATAPACK_CDATAPACK_H #include #include @@ -175,4 +175,4 @@ // caller is responsible for freeing link->delta. extern bool uncompressdeltachainlink(delta_chain_link_t *link); -#endif //CDATAPACK_CDATAPACK_H +#endif // FBHGEXT_CDATAPACK_CDATAPACK_H diff --git a/clib/buffer.h b/clib/buffer.h --- a/clib/buffer.h +++ b/clib/buffer.h @@ -8,8 +8,8 @@ // buffer. this is for internal use only. // no-check-code -#ifndef __FASTMANIFEST_BUFFER_H__ -#define __FASTMANIFEST_BUFFER_H__ +#ifndef FBHGEXT_CLIB_BUFFER_H +#define FBHGEXT_CLIB_BUFFER_H #include #include @@ -54,4 +54,4 @@ const size_t min_increment, const size_t max_increment); -#endif /* __FASTMANIFEST_BUFFER_H__ */ +#endif /* FBHGEXT_CLIB_BUFFER_H */ diff --git a/clib/convert.h b/clib/convert.h --- a/clib/convert.h +++ b/clib/convert.h @@ -7,17 +7,17 @@ // convert.h - conversion utility methods // no-check-code -#ifdef __cplusplus -#include -#endif - -#ifndef __CONVERT_H_C__ -#define __CONVERT_H_C__ +#ifndef FBHGEXT_CLIB_CONVERT_H +#define FBHGEXT_CLIB_CONVERT_H #include #include #include +#ifdef __cplusplus +#include +#endif + static const size_t BIN_NODE_SIZE = 20; static const size_t HEX_NODE_SIZE = 40; @@ -83,11 +83,7 @@ } } -#endif /* #ifndef __CONVERT_H_C__ */ - #ifdef __cplusplus -#ifndef __CONVERT_H_CPP__ -#define __CONVERT_H_CPP__ /** * Converts a given 40-byte hex string into a 20-byte node. @@ -125,5 +121,6 @@ } } -#endif /* #ifndef __CONVERT_H_CPP__ */ -#endif +#endif /* __cplusplus */ + +#endif /* FBHGEXT_CLIB_CONVERT_H */ diff --git a/clib/portability/inet.h b/clib/portability/inet.h --- a/clib/portability/inet.h +++ b/clib/portability/inet.h @@ -6,8 +6,8 @@ // no-check-code -#ifndef PORTABILITY_INET_H -#define PORTABILITY_INET_H +#ifndef FBHGEXT_CLIB_PORTABILITY_INET_H +#define FBHGEXT_CLIB_PORTABILITY_INET_H #if defined(_MSC_VER) #include @@ -17,5 +17,4 @@ #include #endif -#endif /* PORTABILITY_INET_H */ - +#endif /* FBHGEXT_CLIB_PORTABILITY_INET_H */ diff --git a/clib/portability/portability.h b/clib/portability/portability.h --- a/clib/portability/portability.h +++ b/clib/portability/portability.h @@ -6,8 +6,8 @@ // no-check-code -#ifndef PORTABILITY_PORTABILITY_H -#define PORTABILITY_PORTABILITY_H +#ifndef FBHGEXT_CLIB_PORTABILITY_PORTABILITY_H +#define FBHGEXT_CLIB_PORTABILITY_PORTABILITY_H #if defined(_MSC_VER) /* MSVC2015 supports compound literals in C mode (/TC) @@ -28,4 +28,4 @@ #define PACKEDSTRUCT(__Declaration__) __Declaration__ __attribute__((packed)) #endif -#endif /* #ifndef PORTABILITY_PORTABILITY_H */ +#endif /* #ifndef FBHGEXT_CLIB_PORTABILITY_PORTABILITY_H */ diff --git a/clib/portability/unistd.h b/clib/portability/unistd.h --- a/clib/portability/unistd.h +++ b/clib/portability/unistd.h @@ -6,8 +6,8 @@ // no-check-code -#ifndef PORTABILITY_UNISTD_H -#define PORTABILITY_UNISTD_H +#ifndef FBHGEXT_CLIB_PORTABILITY_UNISTD_H +#define FBHGEXT_CLIB_PORTABILITY_UNISTD_H #if defined(_MSC_VER) #include @@ -20,5 +20,4 @@ #include #endif -#endif /* PORTABILITY_UNISTD_H */ - +#endif /* FBHGEXT_CLIB_PORTABILITY_UNISTD_H */ diff --git a/clib/sha1.h b/clib/sha1.h --- a/clib/sha1.h +++ b/clib/sha1.h @@ -7,7 +7,8 @@ // sha1.h - wrapper functions around the underlying SHA-1 implementation. // // no-check-code -#pragma once +#ifndef FBHGEXT_CLIB_SHA1_H +#define FBHGEXT_CLIB_SHA1_H #ifdef __cplusplus extern "C" { @@ -57,3 +58,5 @@ #ifdef __cplusplus } /* extern C */ #endif + +#endif /* FBHGEXT_CLIB_SHA1_H */ diff --git a/cstore/datapackstore.h b/cstore/datapackstore.h --- a/cstore/datapackstore.h +++ b/cstore/datapackstore.h @@ -7,8 +7,8 @@ // datapackstore.h - c++ declarations for a data pack store // no-check-code -#ifndef DATAPACKSTORE_H -#define DATAPACKSTORE_H +#ifndef FBHGEXT_DATAPACKSTORE_H +#define FBHGEXT_DATAPACKSTORE_H extern "C" { #include "cdatapack/cdatapack.h" @@ -131,4 +131,4 @@ void markForRefresh(); }; -#endif //DATAPACKSTORE_H +#endif // FBHGEXT_DATAPACKSTORE_H diff --git a/cstore/key.h b/cstore/key.h --- a/cstore/key.h +++ b/cstore/key.h @@ -7,8 +7,8 @@ // key.h - c++ declarations for a key to pack data // no-check-code -#ifndef KEY_H -#define KEY_H +#ifndef FBHGEXT_CSTORE_KEY_H +#define FBHGEXT_CSTORE_KEY_H #include #include @@ -53,4 +53,4 @@ virtual Key *next() = 0; }; -#endif //KEY_H +#endif // FBHGEXT_CSTORE_KEY_H diff --git a/cstore/match.h b/cstore/match.h --- a/cstore/match.h +++ b/cstore/match.h @@ -7,8 +7,8 @@ // match.h - c++ declarations for a data store // no-check-code -#ifndef MATCH_H -#define MATCH_H +#ifndef FBHGEXT_CSTORE_MATCH_H +#define FBHGEXT_CSTORE_MATCH_H class Matcher { public: @@ -27,4 +27,4 @@ virtual bool visitdir(const std::string &path) { return true; } }; -#endif // MATCH_H +#endif // FBHGEXT_CSTORE_MATCH_H diff --git a/cstore/py-cdatapack.h b/cstore/py-cdatapack.h --- a/cstore/py-cdatapack.h +++ b/cstore/py-cdatapack.h @@ -7,6 +7,9 @@ // py-cdatapack.h - python extension for cdatapack // no-check-code +#ifndef FBHGEXT_CSTORE_PY_CDATAPACK_H +#define FBHGEXT_CSTORE_PY_CDATAPACK_H + // The PY_SSIZE_T_CLEAN define must be defined before the Python.h include, // as per the documentation. #define PY_SSIZE_T_CLEAN @@ -623,3 +626,5 @@ (initproc)cdatapack_init, /* tp_init */ 0, /* tp_alloc */ }; + +#endif /* FBHGEXT_CSTORE_PY_CDATAPACK_H */ diff --git a/cstore/py-datapackstore.h b/cstore/py-datapackstore.h --- a/cstore/py-datapackstore.h +++ b/cstore/py-datapackstore.h @@ -7,6 +7,9 @@ // py-cstore.cpp - c++ implementation of a store // no-check-code +#ifndef FBHGEXT_CSTORE_PY_DATAPACKSTORE_H +#define FBHGEXT_CSTORE_PY_DATAPACKSTORE_H + // The PY_SSIZE_T_CLEAN define must be defined before the Python.h include, // as per the documentation. #define PY_SSIZE_T_CLEAN @@ -426,3 +429,5 @@ (initproc)uniondatapackstore_init, /* tp_init */ 0, /* tp_alloc */ }; + +#endif /* FBHGEXT_CSTORE_PY_DATAPACKSTORE_H */ diff --git a/cstore/py-structs.h b/cstore/py-structs.h --- a/cstore/py-structs.h +++ b/cstore/py-structs.h @@ -7,8 +7,8 @@ // py-structs.h - c++ headers for store python objects // no-check-code -#ifndef CSTORE_PY_STRUCTS -#define CSTORE_PY_STRUCTS +#ifndef FBHGEXT_CSTORE_PY_STRUCTS_H +#define FBHGEXT_CSTORE_PY_STRUCTS_H #include @@ -31,4 +31,4 @@ std::vector substores; }; -#endif //CSTORE_PY_STRUCTS +#endif // FBHGEXT_CSTORE_PY_STRUCTS_H diff --git a/cstore/py-treemanifest.h b/cstore/py-treemanifest.h --- a/cstore/py-treemanifest.h +++ b/cstore/py-treemanifest.h @@ -6,6 +6,9 @@ // py-treemanifest.cpp - c++ implementation of a tree manifest // no-check-code +// +#ifndef FBHGEXT_CSTORE_PY_TREEMANIFEST_H +#define FBHGEXT_CSTORE_PY_TREEMANIFEST_H // The PY_SSIZE_T_CLEAN define must be defined before the Python.h include, // as per the documentation. @@ -1553,3 +1556,5 @@ (initproc)treemanifest_init, /* tp_init */ 0, /* tp_alloc */ }; + +#endif /* FBHGEXT_CSTORE_PY_TREEMANIFEST_H */ diff --git a/cstore/pythonutil.h b/cstore/pythonutil.h --- a/cstore/pythonutil.h +++ b/cstore/pythonutil.h @@ -7,8 +7,8 @@ // pythonutil.h - utilities to glue C++ code to python // no-check-code -#ifndef REMOTEFILELOG_PYTHONOBJ_H -#define REMOTEFILELOG_PYTHONOBJ_H +#ifndef FBHGEXT_CSTORE_PYTHONUTIL_H +#define FBHGEXT_CSTORE_PYTHONUTIL_H // The PY_SSIZE_T_CLEAN define must be defined before the Python.h include, // as per the documentation. @@ -126,4 +126,4 @@ return this->_diff; } }; -#endif //REMOTEFILELOG_PYTHONOBJ_H +#endif // FBHGEXT_CSTORE_PYTHONUTIL_H diff --git a/cstore/store.h b/cstore/store.h --- a/cstore/store.h +++ b/cstore/store.h @@ -7,8 +7,8 @@ // store.h - c++ declarations for a data store // no-check-code -#ifndef STORE_H -#define STORE_H +#ifndef FBHGEXT_CSTORE_STORE_H +#define FBHGEXT_CSTORE_STORE_H #include #include @@ -53,4 +53,4 @@ virtual ConstantStringRef get(const Key &key) = 0; }; -#endif //STORE_H +#endif // FBHGEXT_CSTORE_STORE_H diff --git a/cstore/uniondatapackstore.h b/cstore/uniondatapackstore.h --- a/cstore/uniondatapackstore.h +++ b/cstore/uniondatapackstore.h @@ -7,8 +7,8 @@ // uniondatapackstore.h - c++ declarations for a union datapack store // no-check-code -#ifndef UNIONDATAPACKSTORE_H -#define UNIONDATAPACKSTORE_H +#ifndef FBHGEXT_CSTORE_UNIONDATAPACKSTORE_H +#define FBHGEXT_CSTORE_UNIONDATAPACKSTORE_H #include #include @@ -68,4 +68,4 @@ void markForRefresh(); }; -#endif //UNIONDATAPACKSTORE_H +#endif // FBHGEXT_CSTORE_UNIONDATAPACKSTORE_H diff --git a/ctreemanifest/manifest.h b/ctreemanifest/manifest.h --- a/ctreemanifest/manifest.h +++ b/ctreemanifest/manifest.h @@ -7,8 +7,8 @@ // manifest.h - c++ declarations for a single manifest // no-check-code -#ifndef REMOTEFILELOG_MANIFEST_H -#define REMOTEFILELOG_MANIFEST_H +#ifndef FBHGEXT_CTREEMANIFEST_MANIFEST_H +#define FBHGEXT_CTREEMANIFEST_MANIFEST_H #include #include @@ -191,4 +191,4 @@ bool isfinished() const; }; -#endif //REMOTEFILELOG_MANIFEST_H +#endif // FBHGEXT_CTREEMANIFEST_MANIFEST_H diff --git a/ctreemanifest/manifest_entry.h b/ctreemanifest/manifest_entry.h --- a/ctreemanifest/manifest_entry.h +++ b/ctreemanifest/manifest_entry.h @@ -7,8 +7,8 @@ // manifest_entry.h - c++ declaration for a single manifest entry // no-check-code -#ifndef REMOTEFILELOG_MANIFEST_ENTRY_H -#define REMOTEFILELOG_MANIFEST_ENTRY_H +#ifndef FBHGEXT_CTREEMANIFEST_MANIFEST_ENTRY_H +#define FBHGEXT_CTREEMANIFEST_MANIFEST_ENTRY_H #include #include @@ -79,4 +79,4 @@ static int compareName(ManifestEntry *left, ManifestEntry *right); }; -#endif //REMOTEFILELOG_MANIFEST_ENTRY_H +#endif // FBHGEXT_CTREEMANIFEST_MANIFEST_ENTRY_H diff --git a/ctreemanifest/manifest_fetcher.h b/ctreemanifest/manifest_fetcher.h --- a/ctreemanifest/manifest_fetcher.h +++ b/ctreemanifest/manifest_fetcher.h @@ -7,8 +7,8 @@ // manifest_fetcher.h - c++ declarations for a fetcher for manifests // no-check-code -#ifndef REMOTEFILELOG_MANIFEST_FETCHER_H -#define REMOTEFILELOG_MANIFEST_FETCHER_H +#ifndef FBHGEXT_CTREEMANIFEST_MANIFEST_FETCHER_H +#define FBHGEXT_CTREEMANIFEST_MANIFEST_FETCHER_H #include #include @@ -34,4 +34,4 @@ std::string &node) const; }; -#endif //REMOTEFILELOG_MANIFEST_FETCHER_H +#endif // FBHGEXT_CTREEMANIFEST_MANIFEST_FETCHER_H diff --git a/ctreemanifest/treemanifest.h b/ctreemanifest/treemanifest.h --- a/ctreemanifest/treemanifest.h +++ b/ctreemanifest/treemanifest.h @@ -7,8 +7,8 @@ // treemanifest.h - c++ declarations of a tree manifest // no-check-code -#ifndef REMOTEFILELOG_TREEMANIFEST_H -#define REMOTEFILELOG_TREEMANIFEST_H +#ifndef FBHGEXT_CTREEMANIFEST_TREEMANIFEST_H +#define FBHGEXT_CTREEMANIFEST_TREEMANIFEST_H #include #include @@ -350,4 +350,4 @@ bool clean, Matcher &matcher); -#endif //REMOTEFILELOG_TREEMANIFEST_H +#endif // FBHGEXT_CTREEMANIFEST_TREEMANIFEST_H