Skip to content

Commit

Permalink
Fix a few symbols in EXTRA_EXPORT
Browse files Browse the repository at this point in the history
I thought we stopped doing this, but that's for a separate thread.
  • Loading branch information
botovq committed Dec 11, 2023
1 parent 9e7eb88 commit 9cd0a65
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions crypto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ endif()

if(NOT HAVE_FREEZERO)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/freezero.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} freezero)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_freezero)
endif()

if(NOT HAVE_GETOPT)
Expand All @@ -799,46 +799,46 @@ endif()

if(NOT HAVE_REALLOCARRAY)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/reallocarray.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} reallocarray)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_reallocarray)
endif()

if(NOT HAVE_RECALLOCARRAY)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/recallocarray.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} recallocarray)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_recallocarray)
endif()

if(NOT HAVE_STRCASECMP)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strcasecmp.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strcasecmp)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strcasecmp)
endif()

if(NOT HAVE_STRLCAT)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strlcat.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strlcat)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strlcat)
endif()

if(NOT HAVE_STRLCPY)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strlcpy.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strlcpy)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strlcpy)
endif()

if(NOT HAVE_STRNDUP)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strndup.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strndup)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strndup)
if(NOT HAVE_STRNLEN)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strnlen.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strnlen)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strnlen)
endif()
endif()

if(NOT HAVE_STRSEP)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strsep.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strsep)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strsep)
endif()

if(NOT HAVE_STRTONUM)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/strtonum.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} strtonum)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_strtonum)
endif()

if(NOT HAVE_SYSLOG_R)
Expand All @@ -857,15 +857,15 @@ if(NOT HAVE_EXPLICIT_BZERO)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/explicit_bzero.c)
set_source_files_properties(compat/explicit_bzero.c PROPERTIES COMPILE_FLAGS -O0)
endif()
set(EXTRA_EXPORT ${EXTRA_EXPORT} explicit_bzero)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_explicit_bzero)
endif()

if(NOT HAVE_ARC4RANDOM_BUF)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/arc4random.c)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/arc4random_uniform.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} arc4random)
set(EXTRA_EXPORT ${EXTRA_EXPORT} arc4random_buf)
set(EXTRA_EXPORT ${EXTRA_EXPORT} arc4random_uniform)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_arc4random)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_arc4random_buf)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_arc4random_uniform)

if(NOT HAVE_GETENTROPY)
if(WIN32)
Expand All @@ -891,12 +891,12 @@ endif()

if(NOT HAVE_TIMINGSAFE_BCMP)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_bcmp.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} timingsafe_bcmp)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_timingsafe_bcmp)
endif()

if(NOT HAVE_TIMINGSAFE_MEMCMP)
set(CRYPTO_SRC ${CRYPTO_SRC} compat/timingsafe_memcmp.c)
set(EXTRA_EXPORT ${EXTRA_EXPORT} timingsafe_memcmp)
set(EXTRA_EXPORT ${EXTRA_EXPORT} libressl_timingsafe_memcmp)
endif()

if(NOT ENABLE_ASM)
Expand All @@ -919,6 +919,7 @@ foreach(SYM IN LISTS CRYPTO_UNEXPORT)
string(REPLACE "${SYM}\n" "" SYMS ${SYMS})
endforeach()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/crypto_p.sym ${SYMS})
# XXX should we still be doing this?
if(EXTRA_EXPORT)
list(SORT EXTRA_EXPORT)
foreach(SYM IN LISTS EXTRA_EXPORT)
Expand Down

0 comments on commit 9cd0a65

Please sign in to comment.