Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.16)
cmake_policy(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT implicit hints

project(jana2 VERSION 2.4.0)
project(jana2 VERSION 2.4.0 LANGUAGES CXX)

set(CMAKE_POSITION_INDEPENDENT_CODE ON) # Enable -fPIC for all targets

Expand Down
2 changes: 1 addition & 1 deletion src/external/md5/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

add_library(VendoredMD5 OBJECT md5.c)
add_library(VendoredMD5 OBJECT md5.cc)
target_include_directories(VendoredMD5 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)


Expand Down
16 changes: 8 additions & 8 deletions src/external/md5/md5.c → src/external/md5/md5.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
*/

#include "md5.h"
#include <cstdint>
#include <string.h>

#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
Expand Down Expand Up @@ -161,14 +162,13 @@ md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
* On little-endian machines, we can process properly aligned
* data without copying it.
*/
if (!((data - (const md5_byte_t *)0) & 3)) {
/* data are properly aligned */
X = (const md5_word_t *)data;
} else {
/* not aligned */
memcpy(xbuf, data, 64);
X = xbuf;
}
if (reinterpret_cast<uintptr_t>(data) % alignof(md5_word_t) == 0) {
// data is aligned
X = reinterpret_cast<const md5_word_t*>(data);
} else {
memcpy(xbuf, data, 64);
X = xbuf;
}
}
Comment on lines +171 to 172
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iffy indentation.

#endif
#if BYTE_ORDER == 0
Expand Down
Loading