• R/O
  • HTTP
  • SSH
  • HTTPS

mhash384: Commit

MHash-384 development repository


Commit MetaInfo

Revision1dfdae5cdfc52259d30144f0b731e86815dffa47 (tree)
Zeit2020-02-17 05:13:26
AutorLoRd_MuldeR <mulder2@gmx....>
CommiterLoRd_MuldeR

Log Message

Fixed compilation on FreeBSD (TrueOS) as well as OpenBSD and OpenSolaris (OpenIndiana).

Ändern Zusammenfassung

Diff

--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,12 @@
55 DEBUG ?= 0
66
77 # -----------------------------------------------
8+# TOOLS
9+# -----------------------------------------------
10+
11+TAR ?= tar
12+
13+# -----------------------------------------------
814 # SYSTEM DETECTION
915 # -----------------------------------------------
1016
@@ -51,10 +57,10 @@ all: $(TARFILE)
5157 clean: $(CLEANUP)
5258
5359 $(TARFILE): $(SUBDIRS)
54- @printf "\033[1;36m===[Make package]===\033[0m\n" $@
60+ @printf "\033[1;36m===[Make package]===\033[0m\n"
5561 @mkdir -p $(dir $@)
5662 rm -f $@
57- tar -czvf $@ COPYING.txt -C $(BINDIR) $(EXEFILE) BUILD_TAG.txt
63+ $(TAR) -czvf $@ COPYING.txt -C $(BINDIR) $(EXEFILE) BUILD_TAG.txt
5864 @printf "\033[1;32mCompleted.\033[0m\n"
5965
6066 $(SUBDIRS):
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ MHash-384
88
99 The MHash-384 core library has been written in plain **C**, and the CLI front-end has been written in **C++**. The core library provides a simple "stream processing" API, that is available in two flavors: a plain C99 version and an *object-oriented* C++ wrapper. Either way, the MHash-384 library produces hash values with a fixed length of 384 bits (48 bytes).
1010
11-MHash-384 supports a wide range of compilers, including MSVC++, GCC (MinGW/Cygwin), Clang/LLVM and Intel C++. It also runs on many platforms, including Windows and Linux. Furthermore, the MHash-384 library has already been *ported* to various other programming languages, including **Java**, **Microsoft.NET**, **Python** as well as **Delphi** and **Free Pascal**.
11+MHash-384 supports a wide range of compilers, including MSVC++, GCC, MinGW/Cygwin, Clang/LLVM and Intel C++. It also runs on many platforms, including Windows, Linux, BSD and Solaris. Furthermore, the MHash-384 library has already been *ported* to various other programming languages, including **Java**, **Microsoft.NET**, **Python** as well as **Delphi**.
1212
1313
1414 # Quick Start Guide
@@ -417,6 +417,7 @@ MHash-384 has been tested to successfully build and run on (at least) the follow
417417 - Microsoft Visual C++, version 16.00 (Visual Studio 2010) or newer
418418 - Mingw-w64 (from MSYS2), tested with version 8.0.0, using GCC 9.2.0 or Clang 9.0.0
419419 - MinGW (mingw.org), tested with version 5.3.2, using GCC 8.2.0
420+ - Cygwin, tested with version 3.1.2 (x64), using GCC 7.4.0 or Clang 8.0.1
420421
421422 * **Linux/GNU (x86/x64)**
422423 - Ubuntu, tested with version 16.04 (Xenial), using GCC 5.4.0 or Clang 3.8.0
@@ -424,12 +425,18 @@ MHash-384 has been tested to successfully build and run on (at least) the follow
424425 - Manjaro, tested with version 18.1.5, using GCC 9.2.0 or Clang 9.0.1
425426 - openSUSE (Leap), tested with version 15.1, using GCC 7.5.0 or Clang 7.0.1
426427
428+* **BSD-Family (x86/x64)**
429+ - FreeBSD, tested with TrueOS version 18.12, using GCC 7.4.0 or Clang 7.0.1
430+ - OpenBSD, tested with version 6.6, using GCC 8.2.0 or Clang 8.0.1
431+
432+* **Solaris (x86/x64)**
433+ - OpenSolaris/Illumos, tested with OpenIndiana version 2019.10, using GCC 9.2.0
434+
427435 ## Ports to other lanuguages
428436
429437 * **Java**
430438 - Java SE 8, tested with OpenJDK Runtime Environment 1.8.0_242
431439 - Java SE 11, tested with OpenJDK Runtime Environment 11.0.5
432- - Java SE 13, tested with OpenJDK Runtime Environment 13.0.2
433440
434441 * **.NET Framework**
435442 - Microsoft.NET Framework 4.5 (or newer), tested with Visual Studio 2019 (version 15.9.20)
--- a/frontend/src/main.cpp
+++ b/frontend/src/main.cpp
@@ -25,6 +25,7 @@
2525 #include "sys_info.h"
2626 #include <ctime>
2727 #include <sys/stat.h>
28+#include <errno.h>
2829
2930 /* Win32 I/O stuff */
3031 #ifdef _WIN32
@@ -159,7 +160,8 @@ static opmode_t parse_options(int &arg_offset, options_t &options, const int arg
159160 else
160161 {
161162 print_logo();
162- FPRINTF(stderr, STR("Error: Specified option \"%") PRI_CHAR STR("\" is unknown. Please type \"--help\" for details!\n"), argv[arg_offset]);
163+ FPRINTF(stderr, STR("Error: Specified option \"%") PRI_CHAR STR("\" is unknown!\n"), argv[arg_offset]);
164+ FPRINTF(stderr, STR("Type \"%") PRI_CHAR STR(" --help\" for a list of available options...\n"), argv[0U]);
163165 fflush(stderr);
164166 return MODE_UNKNOWN;
165167 }
--- a/frontend/src/self_test.cpp
+++ b/frontend/src/self_test.cpp
@@ -26,6 +26,7 @@
2626 #include <unordered_set>
2727 #include <array>
2828 #include <algorithm>
29+#include <errno.h>
2930
3031 /*
3132 * Test-case specification
--- a/frontend/src/sys_info.h
+++ b/frontend/src/sys_info.h
@@ -25,11 +25,21 @@
2525 * Detect operating system
2626 */
2727 #if defined(_WIN32)
28-# define SYSTEM_NAME "Win"
28+# define SYSTEM_NAME "Windows"
2929 #elif defined(__CYGWIN__)
3030 # define SYSTEM_NAME "Cygwin"
3131 #elif defined(__linux__)
3232 # define SYSTEM_NAME "Linux"
33+#elif defined(__FreeBSD__)
34+# define SYSTEM_NAME "FreeBSD"
35+#elif defined(__NetBSD__)
36+# define SYSTEM_NAME "NetBSD"
37+#elif defined(__OpenBSD__)
38+# define SYSTEM_NAME "OpenBSD"
39+#elif defined(__sun)
40+# define SYSTEM_NAME "Solaris"
41+#elif defined(__unix__)
42+# define SYSTEM_NAME "Unix"
3343 #else
3444 # error Unknonw platform!
3545 #endif
Show on old repository browser