diff options
author | Dmitry Belyavskiy <beldmit@users.noreply.github.com> | 2017-06-27 15:25:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 15:25:48 +0200 |
commit | 992bc72204a4a879d2094f952bcd7cddf7197606 (patch) | |
tree | a4ede427824e78479e1e6a78f2d03e374b0c5df6 | |
parent | c969f2945cf1e08f72021774ecb89ff29b9a6448 (diff) | |
parent | 0593449f7eea1ac86b2bc255652a66622a3f383f (diff) | |
download | gost-engine-992bc72204a4a879d2094f952bcd7cddf7197606.zip gost-engine-992bc72204a4a879d2094f952bcd7cddf7197606.tar.gz gost-engine-992bc72204a4a879d2094f952bcd7cddf7197606.tar.bz2 |
Merge pull request #32 from mouse07410/master
Fix error in printf() invocation
-rw-r--r-- | CMakeLists.txt | 18 | ||||
-rw-r--r-- | gost12sum.c | 2 | ||||
-rw-r--r-- | gostsum12.c | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 76e51b4..239f259 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,24 @@ else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DL_ENDIAN") endif() +# include and lib directories for OpenSSL +set(GOST_INCLUDE_DIRECTORIES "${OPENSSL_PATH}/include") +set(GOST_LINK_DIRECTORIES "${OPENSSL_PATH}/lib") + +# module linker flags +SET (CMAKE_MODULE_LINKER_FLAGS "-L${OPENSSL_PATH}/lib" $ENV{LDFLAGS} + CACHE STRING "Flags used by the linker during the creation of modules.") +# exe linker flags +SET (CMAKE_EXE_LINKER_FLAGS "-L${OPENSSL_PATH}/lib" $ENV{LDFLAGS} + CACHE STRING "Flags used by the linker during the creation of executables.") +# shared lib linker flags +SET (CMAKE_SHARED_LINKER_FLAGS "-L${OPENSSL_PATH}/lib" $ENV{LDFLAGS} + CACHE STRING "Flags used by the linker during the creation of shared libraries.") + + +include_directories("${GOST_INCLUDE_DIRECTORIES}") +link_directories("${GOST_LINK_DIRECTORIES}") + set(BIN_DIRECTORY bin) set(OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/${BIN_DIRECTORY}) diff --git a/gost12sum.c b/gost12sum.c index 0fdaf4f..d6a50ed 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -260,7 +260,7 @@ int get_line(FILE *f, char *hash, char *filename, int verbose) return 1; nextline: if (verbose) - printf(filename); + printf("%s\n", filename); } return 0; } diff --git a/gostsum12.c b/gostsum12.c index 9eab476..580a8fc 100644 --- a/gostsum12.c +++ b/gostsum12.c @@ -251,7 +251,7 @@ int get_line(FILE *f, char *hash, char *filename, int verbose) return 1; nextline: if (verbose) - printf(filename); + printf("%s\n", filename); } return 0; } |