]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Merge pull request #32 from mouse07410/master
authorDmitry Belyavskiy <beldmit@users.noreply.github.com>
Tue, 27 Jun 2017 13:25:48 +0000 (15:25 +0200)
committerGitHub <noreply@github.com>
Tue, 27 Jun 2017 13:25:48 +0000 (15:25 +0200)
Fix error in printf() invocation

CMakeLists.txt
gost12sum.c
gostsum12.c

index 76e51b4183908f0a40bef61c7004049f157b90a6..239f259ff26bf5db41513cb0510f092fe354d84b 100644 (file)
@@ -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})
index 0fdaf4f58bd8b1b1a717e8400e52228eca616bbd..d6a50ed2676bcd5198d8e6b8c78a532fd822f4e3 100644 (file)
@@ -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;
 }
index 9eab4762f77318ff48b300820fc0df79d3941872..580a8fcaa13736d9e8e739c0a2edb56ab5c16682 100644 (file)
@@ -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;
 }