Fix compiler warnings and improve code quality
- Replace unsafe strcpy with strcpy_s for better security - Fix DLL binding issues by adding PRIVATEBIN_API macros - Add explicit type casts to resolve size conversion warnings - Replace unsafe getenv with _dupenv_s for better security - Add PRIVATEBINAPI_EXPORTS definition in CMakeLists.txt - Improve CMake configuration for better build compatibility
This commit is contained in:
@ -40,6 +40,9 @@ set(HEADERS
|
||||
# Create the shared library
|
||||
add_library(privatebinapi SHARED ${SOURCES} ${HEADERS})
|
||||
|
||||
# Define PRIVATEBINAPI_EXPORTS for the library build
|
||||
target_compile_definitions(privatebinapi PRIVATE PRIVATEBINAPI_EXPORTS)
|
||||
|
||||
# Include directories
|
||||
target_include_directories(privatebinapi PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
@ -110,4 +113,4 @@ if(ENABLE_LLVM_COVERAGE)
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
DEPENDS privatebinapi
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user