Skip to content

Commit

Permalink
Trying to fix small things.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtv committed Oct 31, 2023
1 parent 9f0d438 commit 133494e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 71 deletions.
69 changes: 1 addition & 68 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -18872,79 +18872,12 @@ AX_BS="\\\\"
AX_DQ="\""


printf "// Dummy settings for cross-compile. Configure manually.
#define pqxx_have_concepts false
#define pqxx_have_multidim false
#define pqxx_have_source_location false
#define pqxx_have_span false
#define pqxx_have_ssize false
#define pqxx_have_unreachable false
" > "include/pqxx/cxx_features.hxx"
printf "" > "include/pqxx/cxx_features.hxx"


else $as_nop
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <fstream>

int main()
{
std::ofstream("include/pqxx/cxx_features.hxx") <<

// Feature test macros for libpqxx.
// Generated by generate_checks.py.

"#define pqxx_have_concepts "
#if defined(__cpp_concepts) && __cpp_concepts
"true"
#else
"false"
#endif
"\n"

"#define pqxx_have_multidim "
#if defined(__cpp_multidimensional_subscript) && __cpp_multidimensional_subscript
"true"
#else
"false"
#endif
"\n"

"#define pqxx_have_source_location "
#if defined(__cpp_lib_source_location) && __cpp_lib_source_location
"true"
#else
"false"
#endif
"\n"

"#define pqxx_have_span "
#if defined(__cpp_lib_span) && __cpp_lib_span
"true"
#else
"false"
#endif
"\n"

"#define pqxx_have_ssize "
#if defined(__cpp_lib_ssize) && __cpp_lib_ssize
"true"
#else
"false"
#endif
"\n"

"#define pqxx_have_unreachable "
#if defined(__cpp_lib_unreachable) && __cpp_lib_unreachable
"true"
#else
"false"
#endif
"\n"

<< std::endl;
}



_ACEOF
Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,7 @@ AC_RUN_IFELSE(
[AC_MSG_RESULT([Generated cxx_features.hxx.])],
[AC_MSG_FAILURE(["C++ features check failed."])],
# We're cross-compiling. Generate a dummy.
AX_PRINT_TO_FILE(
[include/pqxx/cxx_features.hxx],
AX_PRINT_TO_FILE([include/pqxx/cxx_features.hxx],
esyscmd(
"tools/generate_checks.py" \
"cxx_features.txt" \
Expand Down
2 changes: 1 addition & 1 deletion tools/generate_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
if sys.version_info >= (3, 11):
from datetime import UTC
else:
from pytz impot UTC
from pytz import UTC
endif

HELP_EPILOGUE = dedent("""\
Expand Down

0 comments on commit 133494e

Please sign in to comment.