Repository navigation
Use non-reserved name for superlu_xdefs.h.base's include guard - #19
Merged
xiaoyeli merged 1 commit intoNov 14, 2026
Merged
Conversation
Identifiers that begin with two underscores are reserved for the implementation in C and C++ (xiaoyeli/superlu#189, "Use non-reserved names for header include guards", which fixed the same __SUPERLU_* pattern in the sibling serial-SuperLU repo's slu_*defs.h headers). superlu_xdefs.h.base generates superlu_sdefs.h/superlu_ddefs.h/ superlu_zdefs.h (see Makefile) and used #ifndef/#define __SUPERLU_@(PRE)DEFS as its include guard. Rename it to SUPERLU_@(PRE)DEFS_H, and fix the closing #endif comment to match (it previously used a lowercase @(pre) that didn't even match the uppercase @(PRE) used by the #ifndef/#define, a pre-existing cosmetic mismatch). The identical guard pattern in SRC/OLD_TriSolve/superlu_xdefs.h.base and SRC/bak/superlu_xdefs.h.base.bak is left alone: neither is referenced by the Makefile, so neither feeds the active template generation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011vhWoBbcvH5n4PgHLzLYev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
xiaoyeli/superlu#189 ("Use non-reserved names for header include guards") fixed the sibling serial-SuperLU repo's headers, which used
__SUPERLU_*-style include guards — identifiers beginning with two underscores are reserved for the implementation in C and C++. It renamed guards like__SUPERLU_dSP_DEFStoSUPERLU_dSP_DEFS_Hacrossslu_Cnames.h,slu_cdefs.h,slu_dcomplex.h,slu_ddefs.h,slu_scomplex.h,slu_sdefs.h,slu_util.h,slu_zdefs.h,superlu_enum_consts.h, andsupermatrix.h.This repo's equivalent
superlu_dist_basedoesn't track most of those files at all (supermatrix.h,superlu_enum_consts.h,dcomplex.h, etc. are precision-independent and copied as-is intosuperlu_dist, with no.basetemplate here). The one file in this repo with the same reserved-guard pattern isSRC/superlu_xdefs.h.base, which generatessuperlu_sdefs.h/superlu_ddefs.h/superlu_zdefs.h(per theMakefile) and used:This PR renames it to
SUPERLU_@(PRE)DEFS_H, matching the upstream fix's convention (drop the leading double underscore, append_H). It also fixes the closing#endifcomment, which used a lowercase@(pre)that didn't even match the uppercase@(PRE)in the#ifndef/#define— a pre-existing cosmetic mismatch, harmless since it's just a comment, but worth aligning while touching this line.Not touched
SRC/OLD_TriSolve/superlu_xdefs.h.baseandSRC/bak/superlu_xdefs.h.base.bakhave the identical pattern, but neither is referenced by theMakefile, so neither feeds the active template generation — left alone as dead/legacy copies.Generated by Claude Code