Skip to content

Use non-reserved names for header include guards - #5

Merged
xiaoyeli merged 1 commit into
masterfrom
claude/epic-rubin-j04ke9
Nov 12, 2026
Merged

xiaoyeli merged 1 commit into
masterfrom
claude/epic-rubin-j04ke9

Conversation

@xiaoyeli

Copy link
Copy Markdown
Owner

Summary

Template counterpart of xiaoyeli/superlu#189. Identifiers that begin with two underscores are reserved for the implementation in C and C++, so the include guards in the two template headers are renamed:

Template Old guard New guard
SRC/slu_xcomplex.h.base __SUPERLU_@(MOD_PRE)COMPLEX SUPERLU_@(MOD_PRE)COMPLEX_H
SRC/slu_xdefs.h.base __SUPERLU_@(pre)SP_DEFS SUPERLU_@(pre)SP_DEFS_H

Each guard changes in three places: the #ifndef, the #define, and the closing #endif comment.

Scope

Upstream PR 189 touched 11 headers. Only slu_{s,d}complex.h and slu_{s,d,c,z}defs.h are generated from templates in this repository, and those are covered here. The other headers it changed (slu_Cnames.h, slu_util.h, superlu_enum_consts.h, supermatrix.h, CBLAS/slu_Cnames.h) have no template in superlu_base, so nothing further is needed for them.

Not touched: the legacy SRC/dcomplex.h (guard __SUPERLU_dCOMPLEX) and the Doxygen copy under SRC/html/. Neither is extracted by the Makefile and neither corresponds to a file in the upstream PR.

Verification

With @(MOD_PRE) substituted by D and @(pre) by d, the changed lines are identical to the upstream diff of SRC/slu_dcomplex.h and SRC/slu_ddefs.h at merge commit a8d98be.


Generated by Claude Code

Template counterpart of xiaoyeli/superlu#189. Identifiers beginning with
two underscores are reserved for the implementation in C and C++, so the
include guards in slu_xcomplex.h.base and slu_xdefs.h.base become
SUPERLU_<PRE>COMPLEX_H and SUPERLU_<pre>SP_DEFS_H, matching the extracted
slu_{s,d}complex.h and slu_{s,d,c,z}defs.h on superlu master.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VjnVBdsXEM3c41ssQ3hFAM
@xiaoyeli
xiaoyeli merged commit 8fe9bf9 into master Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants