consistent header guards use consistent names for the #include / #define header guard pattern.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717
diff --git a/src/cc-compat.h b/src/cc-compat.h
index cefdc92..0f05cd2 100644
--- a/src/cc-compat.h
+++ b/src/cc-compat.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_compat_h__
-#define INCLUDE_compat_h__
+#ifndef INCLUDE_cc_compat_h__
+#define INCLUDE_cc_compat_h__
#include <stdarg.h>
@@ -84,4 +84,4 @@
# endif
#endif
-#endif /* INCLUDE_compat_h__ */
+#endif
diff --git a/src/common.h b/src/common.h
index d3622d3..5fb4a60 100644
--- a/src/common.h
+++ b/src/common.h
@@ -238,4 +238,4 @@ GIT_INLINE(void) git__init_structure(void *structure, size_t len, unsigned int v
#include "util.h"
-#endif /* INCLUDE_common_h__ */
+#endif
diff --git a/src/config_file.h b/src/config_file.h
index 25ef45e..72818e5 100644
--- a/src/config_file.h
+++ b/src/config_file.h
@@ -71,4 +71,3 @@ GIT_INLINE(int) git_config_file_unlock(git_config_backend *cfg, int success)
extern int git_config_file_normalize_section(char *start, char *end);
#endif
-
diff --git a/src/config_parse.h b/src/config_parse.h
index 6c18639..d14a8e6 100644
--- a/src/config_parse.h
+++ b/src/config_parse.h
@@ -4,6 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
+#ifndef INCLUDE_config_parse_h__
+#define INCLUDE_config_parse_h__
#include "common.h"
#include "array.h"
@@ -58,3 +60,5 @@ int git_config_parse(
git_config_parser_comment_cb on_comment,
git_config_parser_eof_cb on_eof,
void *data);
+
+#endif
diff --git a/src/diff.h b/src/diff.h
index 8c04438..93374b9 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -66,4 +66,3 @@ extern int git_diff__entry_cmp(const void *a, const void *b);
extern int git_diff__entry_icmp(const void *a, const void *b);
#endif
-
diff --git a/src/diff_generate.h b/src/diff_generate.h
index 8de2a06..3f182b0 100644
--- a/src/diff_generate.h
+++ b/src/diff_generate.h
@@ -126,4 +126,3 @@ GIT_INLINE(int) git_diff_file__resolve_zero_size(
}
#endif
-
diff --git a/src/diff_tform.h b/src/diff_tform.h
index a31c40f..7abb8b3 100644
--- a/src/diff_tform.h
+++ b/src/diff_tform.h
@@ -23,4 +23,3 @@ extern int git_diff_find_similar__calc_similarity(
int *score, void *siga, void *sigb, void *payload);
#endif
-
diff --git a/src/fileops.h b/src/fileops.h
index 57b9d17..2844ece 100644
--- a/src/fileops.h
+++ b/src/fileops.h
@@ -387,4 +387,4 @@ extern int git_futils_fsync_dir(const char *path);
*/
extern int git_futils_fsync_parent(const char *path);
-#endif /* INCLUDE_fileops_h__ */
+#endif
diff --git a/src/fnmatch.h b/src/fnmatch.h
index 88af459..ddaae15 100644
--- a/src/fnmatch.h
+++ b/src/fnmatch.h
@@ -25,8 +25,8 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-#ifndef INCLUDE_fnmatch__compat_h__
-#define INCLUDE_fnmatch__compat_h__
+#ifndef INCLUDE_fnmatch_h__
+#define INCLUDE_fnmatch_h__
#include "common.h"
@@ -45,5 +45,4 @@
extern int p_fnmatch(const char *pattern, const char *string, int flags);
-#endif /* _FNMATCH_H */
-
+#endif
diff --git a/src/hash.h b/src/hash.h
index cce3a7f..31eaf88 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -42,4 +42,4 @@ int git_hash_final(git_oid *out, git_hash_ctx *c);
int git_hash_buf(git_oid *out, const void *data, size_t len);
int git_hash_vec(git_oid *out, git_buf_vec *vec, size_t n);
-#endif /* INCLUDE_hash_h__ */
+#endif
diff --git a/src/hash/hash_collisiondetect.h b/src/hash/hash_collisiondetect.h
index 5fdae8d..4c5e3c3 100644
--- a/src/hash/hash_collisiondetect.h
+++ b/src/hash/hash_collisiondetect.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_hash_collisiondetect_h__
-#define INCLUDE_hash_collisiondetect_h__
+#ifndef INCLUDE_hash_hash_collisiondetect_h__
+#define INCLUDE_hash_hash_collisiondetect_h__
#include "hash.h"
#include "sha1dc/sha1.h"
@@ -44,4 +44,4 @@ GIT_INLINE(int) git_hash_final(git_oid *out, git_hash_ctx *ctx)
return 0;
}
-#endif /* INCLUDE_hash_collisiondetect_h__ */
+#endif
diff --git a/src/hash/hash_common_crypto.h b/src/hash/hash_common_crypto.h
index 4cd229d..5c3887d 100644
--- a/src/hash/hash_common_crypto.h
+++ b/src/hash/hash_common_crypto.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_hash_common_crypto_h__
-#define INCLUDE_hash_common_crypto_h__
+#ifndef INCLUDE_hash_hash_common_crypto_h__
+#define INCLUDE_hash_hash_common_crypto_h__
#include "hash.h"
@@ -54,4 +54,4 @@ GIT_INLINE(int) git_hash_final(git_oid *out, git_hash_ctx *ctx)
return 0;
}
-#endif /* INCLUDE_hash_common_crypto_h__ */
+#endif
diff --git a/src/hash/hash_generic.h b/src/hash/hash_generic.h
index 114b607..21a0428 100644
--- a/src/hash/hash_generic.h
+++ b/src/hash/hash_generic.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_hash_generic_h__
-#define INCLUDE_hash_generic_h__
+#ifndef INCLUDE_hash_hash_generic_h__
+#define INCLUDE_hash_hash_generic_h__
#include "common.h"
@@ -22,4 +22,4 @@ struct git_hash_ctx {
#define git_hash_ctx_init(ctx) git_hash_init(ctx)
#define git_hash_ctx_cleanup(ctx)
-#endif /* INCLUDE_hash_generic_h__ */
+#endif
diff --git a/src/hash/hash_openssl.h b/src/hash/hash_openssl.h
index 048c2bd..eb2dcb0 100644
--- a/src/hash/hash_openssl.h
+++ b/src/hash/hash_openssl.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_hash_openssl_h__
-#define INCLUDE_hash_openssl_h__
+#ifndef INCLUDE_hash_hash_openssl_h__
+#define INCLUDE_hash_hash_openssl_h__
#include "hash.h"
@@ -56,4 +56,4 @@ GIT_INLINE(int) git_hash_final(git_oid *out, git_hash_ctx *ctx)
return 0;
}
-#endif /* INCLUDE_hash_openssl_h__ */
+#endif
diff --git a/src/hash/hash_win32.h b/src/hash/hash_win32.h
index 187c072..9704204 100644
--- a/src/hash/hash_win32.h
+++ b/src/hash/hash_win32.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_hash_win32_h__
-#define INCLUDE_hash_win32_h__
+#ifndef INCLUDE_hash_hash_win32_h__
+#define INCLUDE_hash_hash_win32_h__
#include "common.h"
@@ -138,4 +138,4 @@ struct git_hash_ctx {
} ctx;
};
-#endif /* INCLUDE_hash_openssl_h__ */
+#endif
diff --git a/src/integer.h b/src/integer.h
index 61712ce..30528db 100644
--- a/src/integer.h
+++ b/src/integer.h
@@ -93,4 +93,4 @@ GIT_INLINE(bool) git__multiply_sizet_overflow(size_t *out, size_t one, size_t tw
#endif
-#endif /* INCLUDE_integer_h__ */
+#endif
diff --git a/src/map.h b/src/map.h
index da3d1e1..2009c3a 100644
--- a/src/map.h
+++ b/src/map.h
@@ -43,4 +43,4 @@ typedef struct { /* memory mapped buffer */
extern int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset);
extern int p_munmap(git_map *map);
-#endif /* INCLUDE_map_h__ */
+#endif
diff --git a/src/message.h b/src/message.h
index 88fc788..251727b 100644
--- a/src/message.h
+++ b/src/message.h
@@ -14,4 +14,4 @@
int git_message__prettify(git_buf *message_out, const char *message, int strip_comments);
-#endif /* INCLUDE_message_h__ */
+#endif
diff --git a/src/notes.h b/src/notes.h
index cfc0ca2..2168e45 100644
--- a/src/notes.h
+++ b/src/notes.h
@@ -29,4 +29,4 @@ struct git_note {
char *message;
};
-#endif /* INCLUDE_notes_h__ */
+#endif
diff --git a/src/pack-objects.h b/src/pack-objects.h
index e1e0ee3..c9cd577 100644
--- a/src/pack-objects.h
+++ b/src/pack-objects.h
@@ -104,4 +104,4 @@ struct git_packbuilder {
int git_packbuilder_write_buf(git_buf *buf, git_packbuilder *pb);
-#endif /* INCLUDE_pack_objects_h__ */
+#endif
diff --git a/src/parse.h b/src/parse.h
index 419014e..46897e3 100644
--- a/src/parse.h
+++ b/src/parse.h
@@ -4,6 +4,9 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
+#ifndef INCLUDE_parse_h__
+#define INCLUDE_parse_h__
+
#include "common.h"
typedef struct {
@@ -54,3 +57,5 @@ enum GIT_PARSE_PEEK_FLAGS {
};
int git_parse_peek(char *out, git_parse_ctx *ctx, int flags);
+
+#endif
diff --git a/src/reflog.h b/src/reflog.h
index d54b4cd..8c38959 100644
--- a/src/reflog.h
+++ b/src/reflog.h
@@ -38,4 +38,4 @@ GIT_INLINE(size_t) reflog_inverse_index(size_t idx, size_t total)
return (total - 1) - idx;
}
-#endif /* INCLUDE_reflog_h__ */
+#endif
diff --git a/src/sysdir.h b/src/sysdir.h
index 8f4466b..ce1b4dc 100644
--- a/src/sysdir.h
+++ b/src/sysdir.h
@@ -116,4 +116,4 @@ extern int git_sysdir_get_str(char *out, size_t outlen, git_sysdir_t which);
*/
extern int git_sysdir_set(git_sysdir_t which, const char *paths);
-#endif /* INCLUDE_sysdir_h__ */
+#endif
diff --git a/src/thread-utils.h b/src/thread-utils.h
index 2df2aeb..035de69 100644
--- a/src/thread-utils.h
+++ b/src/thread-utils.h
@@ -243,4 +243,4 @@ extern int git_online_cpus(void);
# define GIT_MEMORY_BARRIER /* noop */
#endif
-#endif /* INCLUDE_thread_utils_h__ */
+#endif
diff --git a/src/transports/auth.h b/src/transports/auth.h
index 06af79d..3b8b29e 100644
--- a/src/transports/auth.h
+++ b/src/transports/auth.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_http_auth_h__
-#define INCLUDE_http_auth_h__
+#ifndef INCLUDE_transports_auth_h__
+#define INCLUDE_transports_auth_h__
#include "common.h"
@@ -62,4 +62,3 @@ int git_http_auth_basic(
const gitno_connection_data *connection_data);
#endif
-
diff --git a/src/transports/auth_negotiate.h b/src/transports/auth_negotiate.h
index 5866c19..15a528a 100644
--- a/src/transports/auth_negotiate.h
+++ b/src/transports/auth_negotiate.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_auth_negotiate_h__
-#define INCLUDE_auth_negotiate_h__
+#ifndef INCLUDE_transports_auth_negotiate_h__
+#define INCLUDE_transports_auth_negotiate_h__
#include "common.h"
#include "git2.h"
@@ -25,4 +25,3 @@ extern int git_http_auth_negotiate(
#endif /* GIT_GSSAPI */
#endif
-
diff --git a/src/transports/cred.h b/src/transports/cred.h
index dceab9a..ed5821c 100644
--- a/src/transports/cred.h
+++ b/src/transports/cred.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_git_cred_h__
-#define INCLUDE_git_cred_h__
+#ifndef INCLUDE_transports_cred_h__
+#define INCLUDE_transports_cred_h__
#include "common.h"
diff --git a/src/transports/smart.h b/src/transports/smart.h
index f1ad704..e33a254 100644
--- a/src/transports/smart.h
+++ b/src/transports/smart.h
@@ -4,6 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
+#ifndef INCLUDE_transports_smart_h__
+#define INCLUDE_transports_smart_h__
#include "common.h"
@@ -194,3 +196,5 @@ int git_pkt_buffer_done(git_buf *buf);
int git_pkt_buffer_wants(const git_remote_head * const *refs, size_t count, transport_smart_caps *caps, git_buf *buf);
int git_pkt_buffer_have(git_oid *oid, git_buf *buf);
void git_pkt_free(git_pkt *pkt);
+
+#endif
diff --git a/src/transports/ssh.h b/src/transports/ssh.h
index e36e724..d3e741f 100644
--- a/src/transports/ssh.h
+++ b/src/transports/ssh.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_ssh_h__
-#define INCLUDE_ssh_h__
+#ifndef INCLUDE_transports_ssh_h__
+#define INCLUDE_transports_ssh_h__
#include "common.h"
diff --git a/src/unix/posix.h b/src/unix/posix.h
index ee36ea0..f2fffd5 100644
--- a/src/unix/posix.h
+++ b/src/unix/posix.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_posix__unix_h__
-#define INCLUDE_posix__unix_h__
+#ifndef INCLUDE_unix_posix_h__
+#define INCLUDE_unix_posix_h__
#ifndef LIBGIT2_NO_FEATURES_H
# include "git2/sys/features.h"
diff --git a/src/unix/pthread.h b/src/unix/pthread.h
index 3f23d10..233561b 100644
--- a/src/unix/pthread.h
+++ b/src/unix/pthread.h
@@ -53,4 +53,4 @@ typedef struct {
#define git_rwlock_free(a) pthread_rwlock_destroy(a)
#define GIT_RWLOCK_STATIC_INIT PTHREAD_RWLOCK_INITIALIZER
-#endif /* INCLUDE_unix_pthread_h__ */
+#endif
diff --git a/src/util.h b/src/util.h
index 80ee8e6..63ffa13 100644
--- a/src/util.h
+++ b/src/util.h
@@ -539,4 +539,4 @@ GIT_INLINE(double) git__timer(void)
extern int git__getenv(git_buf *out, const char *name);
-#endif /* INCLUDE_util_h__ */
+#endif
diff --git a/src/win32/dir.h b/src/win32/dir.h
index 704a9a8..acd6472 100644
--- a/src/win32/dir.h
+++ b/src/win32/dir.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_dir_h__
-#define INCLUDE_dir_h__
+#ifndef INCLUDE_win32_dir_h__
+#define INCLUDE_win32_dir_h__
#include "common.h"
@@ -41,4 +41,4 @@ extern int git__closedir(git__DIR *);
# define closedir git__closedir
# endif
-#endif /* INCLUDE_dir_h__ */
+#endif
diff --git a/src/win32/error.h b/src/win32/error.h
index a2ecf6a..9e81141 100644
--- a/src/win32/error.h
+++ b/src/win32/error.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_git_win32_error_h__
-#define INCLUDE_git_win32_error_h__
+#ifndef INCLUDE_win32_error_h__
+#define INCLUDE_win32_error_h__
#include "common.h"
diff --git a/src/win32/findfile.h b/src/win32/findfile.h
index 1eae469..e7bcf94 100644
--- a/src/win32/findfile.h
+++ b/src/win32/findfile.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_git_findfile_h__
-#define INCLUDE_git_findfile_h__
+#ifndef INCLUDE_win32_findfile_h__
+#define INCLUDE_win32_findfile_h__
#include "common.h"
diff --git a/src/win32/mingw-compat.h b/src/win32/mingw-compat.h
index 698ebed..aa2bef9 100644
--- a/src/win32/mingw-compat.h
+++ b/src/win32/mingw-compat.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_mingw_compat__
-#define INCLUDE_mingw_compat__
+#ifndef INCLUDE_win32_mingw_compat_h__
+#define INCLUDE_win32_mingw_compat_h__
#if defined(__MINGW32__)
@@ -20,4 +20,4 @@ void __mingworg_MemoryBarrier(void);
#endif
-#endif /* INCLUDE_mingw_compat__ */
+#endif
diff --git a/src/win32/msvc-compat.h b/src/win32/msvc-compat.h
index 12b50d9..ea77820 100644
--- a/src/win32/msvc-compat.h
+++ b/src/win32/msvc-compat.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_msvc_compat__
-#define INCLUDE_msvc_compat__
+#ifndef INCLUDE_win32_msvc_compat_h__
+#define INCLUDE_win32_msvc_compat_h__
#if defined(_MSC_VER)
@@ -19,4 +19,4 @@ typedef SSIZE_T ssize_t;
#define GIT_STDLIB_CALL __cdecl
-#endif /* INCLUDE_msvc_compat__ */
+#endif
diff --git a/src/win32/path_w32.h b/src/win32/path_w32.h
index ac1fb4b..83ffd1f 100644
--- a/src/win32/path_w32.h
+++ b/src/win32/path_w32.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_git_path_w32_h__
-#define INCLUDE_git_path_w32_h__
+#ifndef INCLUDE_win32_path_w32_h__
+#define INCLUDE_win32_path_w32_h__
#include "common.h"
diff --git a/src/win32/posix.h b/src/win32/posix.h
index 64769ec..d5ab2e8 100644
--- a/src/win32/posix.h
+++ b/src/win32/posix.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_posix__w32_h__
-#define INCLUDE_posix__w32_h__
+#ifndef INCLUDE_win32_posix_h__
+#define INCLUDE_win32_posix_h__
#include "common.h"
#include "../posix.h"
diff --git a/src/win32/reparse.h b/src/win32/reparse.h
index 70f9fd6..5f7408a 100644
--- a/src/win32/reparse.h
+++ b/src/win32/reparse.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_git_win32_reparse_h__
-#define INCLUDE_git_win32_reparse_h__
+#ifndef INCLUDE_win32_reparse_h__
+#define INCLUDE_win32_reparse_h__
/* This structure is defined on MSDN at
* http://msdn.microsoft.com/en-us/library/windows/hardware/ff552012(v=vs.85).aspx
diff --git a/src/win32/thread.h b/src/win32/thread.h
index d217722..41cbf01 100644
--- a/src/win32/thread.h
+++ b/src/win32/thread.h
@@ -61,4 +61,4 @@ int git_rwlock_wrlock(git_rwlock *);
int git_rwlock_wrunlock(git_rwlock *);
int git_rwlock_free(git_rwlock *);
-#endif /* INCLUDE_win32_thread_h__ */
+#endif
diff --git a/src/win32/utf-conv.h b/src/win32/utf-conv.h
index bab7ba9..6090a4b 100644
--- a/src/win32/utf-conv.h
+++ b/src/win32/utf-conv.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_git_utfconv_h__
-#define INCLUDE_git_utfconv_h__
+#ifndef INCLUDE_win32_utf_conv_h__
+#define INCLUDE_win32_utf_conv_h__
#include "common.h"
diff --git a/src/win32/w32_buffer.h b/src/win32/w32_buffer.h
index e15ea68..43298e4 100644
--- a/src/win32/w32_buffer.h
+++ b/src/win32/w32_buffer.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_git_win32_buffer_h__
-#define INCLUDE_git_win32_buffer_h__
+#ifndef INCLUDE_win32_w32_buffer_h__
+#define INCLUDE_win32_w32_buffer_h__
#include "common.h"
diff --git a/src/win32/w32_crtdbg_stacktrace.h b/src/win32/w32_crtdbg_stacktrace.h
index bb869b3..3f58035 100644
--- a/src/win32/w32_crtdbg_stacktrace.h
+++ b/src/win32/w32_crtdbg_stacktrace.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_w32_crtdbg_stacktrace_h__
-#define INCLUDE_w32_crtdbg_stacktrace_h__
+#ifndef INCLUDE_win32_w32_crtdbg_stacktrace_h__
+#define INCLUDE_win32_w32_crtdbg_stacktrace_h__
#include "common.h"
diff --git a/src/win32/w32_stack.h b/src/win32/w32_stack.h
index a514ace..5f0009e 100644
--- a/src/win32/w32_stack.h
+++ b/src/win32/w32_stack.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_w32_stack_h__
-#define INCLUDE_w32_stack_h__
+#ifndef INCLUDE_win32_w32_stack_h__
+#define INCLUDE_win32_w32_stack_h__
#include "common.h"
@@ -137,4 +137,4 @@ int git_win32__stack(
const char *prefix, const char *suffix);
#endif /* GIT_MSVC_CRTDBG */
-#endif /* INCLUDE_w32_stack_h__ */
+#endif
diff --git a/src/win32/w32_util.h b/src/win32/w32_util.h
index d81e55a..6531f47 100644
--- a/src/win32/w32_util.h
+++ b/src/win32/w32_util.h
@@ -5,8 +5,8 @@
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_w32_util_h__
-#define INCLUDE_w32_util_h__
+#ifndef INCLUDE_win32_w32_util_h__
+#define INCLUDE_win32_w32_util_h__
#include "common.h"
diff --git a/src/win32/win32-compat.h b/src/win32/win32-compat.h
index f888fd6..dee40a4 100644
--- a/src/win32/win32-compat.h
+++ b/src/win32/win32-compat.h
@@ -4,8 +4,8 @@
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
-#ifndef INCLUDE_win32_compat__
-#define INCLUDE_win32_compat__
+#ifndef INCLUDE_win32_win32_compat_h__
+#define INCLUDE_win32_win32_compat_h__
#include <stdint.h>
#include <time.h>
@@ -49,4 +49,4 @@ struct p_stat {
#define stat p_stat
-#endif /* INCLUDE_win32_compat__ */
+#endif
diff --git a/src/zstream.h b/src/zstream.h
index fcc4a31..c2404f3 100644
--- a/src/zstream.h
+++ b/src/zstream.h
@@ -44,4 +44,4 @@ void git_zstream_reset(git_zstream *zstream);
int git_zstream_deflatebuf(git_buf *out, const void *in, size_t in_len);
int git_zstream_inflatebuf(git_buf *out, const void *in, size_t in_len);
-#endif /* INCLUDE_zstream_h__ */
+#endif