Branch: refs/heads/master
Revision: 69d5d1a
Author: mppf
Log Message:
Merge pull request #17844 from mppf/mysterror-fix
compiler/next: move mystrerror to a C file
This is to resolve errors with make
on CentOS 7. The POSIX #define
does not seem to work within C++ on that system. We get errors along the
lines of:
/usr/local/include/.../c++locale.h:52:23: error: ‘uselocale’ was not declared in this scope
extern "C" __typeof(uselocale) __uselocale;
However we don't really need to use the feature macros in a C++ file - we
can instead have a C file that wraps the call to strerror_r
to make
sure to get the posix version and then call that in our C++ code. That is
what this PR does and it resolves the issue on CentOS 7.
While there:
- moved the other C file in compiler/next,
my_aligned_alloc.c
, to the
util directory - removed
bswap.h
andsys_basic.h
since these are no longer needed
(they were used for an endianness check but PR #17648 addressed it in
a different way). - renamed files.cpp/files.h to filesystem.cpp/filesystem.h to avoid
having 2 files with the same name.
Reviewed by @dlongnecke-cray - thanks!
-
[x] full local testing
Modified Files:
A compiler/next/lib/util/filesystem.cpp
A compiler/next/lib/util/filesystem.h
A compiler/next/lib/util/my_aligned_alloc.c
A compiler/next/lib/util/my_aligned_alloc.h
A compiler/next/lib/util/my_strerror_r.c
A compiler/next/lib/util/my_strerror_r.h
R compiler/next/lib/queries/my_aligned_alloc.c
R compiler/next/lib/queries/my_aligned_alloc.h
R compiler/next/lib/util/bswap.h
R compiler/next/lib/util/files.cpp
R compiler/next/lib/util/files.h
R compiler/next/lib/util/mystrerror.cpp
R compiler/next/lib/util/mystrerror.h
R compiler/next/lib/util/sys_basic.h
M compiler/next/lib/frontend/Parser.cpp
M compiler/next/lib/frontend/frontend-queries.cpp
M compiler/next/lib/queries/CMakeLists.txt
M compiler/next/lib/queries/Context.cpp
M compiler/next/lib/queries/Makefile
M compiler/next/lib/queries/Makefile.include
M compiler/next/lib/queries/UniqueString.cpp
M compiler/next/lib/uast/Local.cpp
M compiler/next/lib/uast/Serial.cpp
M compiler/next/lib/util/CMakeLists.txt
M compiler/next/lib/util/Makefile
M compiler/next/lib/util/Makefile.includeCompare: https://github.com/chapel-lang/chapel/compare/e7de784148de...69d5d1a77ce8