]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Move md5 and sha256 out to compat.
authorRoy Marples <roy@marples.name>
Sun, 19 Mar 2017 20:21:18 +0000 (20:21 +0000)
committerRoy Marples <roy@marples.name>
Sun, 19 Mar 2017 20:21:18 +0000 (20:21 +0000)
Stop using .. to find config.h.

12 files changed:
compat/arc4random_uniform.c
compat/bitops.h
compat/crypt/md5.c [moved from src/crypt/md5.c with 100% similarity]
compat/crypt/md5.h [moved from src/crypt/md5.h with 100% similarity]
compat/crypt/sha256.c [moved from src/crypt/sha256.c with 99% similarity]
compat/crypt/sha256.h [moved from src/crypt/sha256.h with 100% similarity]
compat/pidfile.c
compat/posix_spawn.c
configure
src/Makefile
src/crypt/hmac_md5.c
src/ipv6.c

index b597551271c05edec19bf382d2369abf7c0712ec..0f1b7b29675941199987d84cd0c8b2d7fd639c7c 100644 (file)
@@ -19,7 +19,7 @@
 
 /* We need to include config.h so we pickup either the system arc4random
  * or our compat one. */
-#include "../config.h"
+#include "config.h"
 
 /*
  * Calculate a uniformly distributed random number less than upper_bound
index d67fa848bf7e4530eb356d8b02b4459ba61141eb..31979a20f458bdb26529327cd67fd7f00b0f4103 100644 (file)
@@ -33,7 +33,7 @@
 #define COMPAT_BITOPS_H
 
 #include <stdint.h>
-#include "../common.h"
+#include "common.h"
 
 /*
  * Find First Set functions
similarity index 100%
rename from src/crypt/md5.c
rename to compat/crypt/md5.c
similarity index 100%
rename from src/crypt/md5.h
rename to compat/crypt/md5.h
similarity index 99%
rename from src/crypt/sha256.c
rename to compat/crypt/sha256.c
index 222d93ab4b82c4b7b1e22bbcc25377272343f0ad..6b2007ddbf2cc62af2f80342272be2246f976482 100644 (file)
@@ -37,7 +37,7 @@
 #  endif
 #endif
 
-#include "../common.h"
+#include "common.h"
 #include "sha256.h"
 
 #if BYTE_ORDER == BIG_ENDIAN
similarity index 100%
rename from src/crypt/sha256.h
rename to compat/crypt/sha256.h
index 20302c29bfbf26cc4e9376942bec9b4d17ff67d9..6aea468b4d768a3104c1a5408d9fde8be21823f4 100644 (file)
@@ -43,8 +43,8 @@
 #include <unistd.h>
 
 #include <sys/file.h>  /* for flock(2) */
-#include "../config.h"
-#include "../defs.h"
+#include "config.h"
+#include "defs.h"
 
 static pid_t pidfile_pid;
 static char pidfile_path[PATH_MAX];
index 0cb142e55ca5b7a55bcb42869a8f92b8c7056ef8..50183692faab19322b1e2d7cf88f356b3bacb5c6 100644 (file)
@@ -37,7 +37,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include "../common.h"
+#include "common.h"
 #include "posix_spawn.h"
 
 #ifndef _NSIG
index 236bf281a3113232b19962c980a28950daeb468b..d1f647ea9a63d64914c5704fe3a0d5ca4126442e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1202,7 +1202,8 @@ EOF
        rm -f _md5.c _md5
 fi
 if [ "$MD5" = no ]; then
-       echo "MD5_SRC=  crypt/md5.c" >>$CONFIG_MK
+       echo "#include          \"compat/crypt/md5.h\"" >>$CONFIG_H
+       echo "MD5_SRC=  compat/crypt/md5.c" >>$CONFIG_MK
 else
        echo "MD5_SRC=" >>$CONFIG_MK
        echo "#define HAVE_MD5_H" >>$CONFIG_H
@@ -1292,7 +1293,8 @@ EOF
        fi
 fi
 if [ "$SHA2" = no ]; then
-       echo "SHA256_SRC=       crypt/sha256.c" >>$CONFIG_MK
+       echo "#include          \"compat/crypt/sha256.h\"" >>$CONFIG_H
+       echo "SHA256_SRC=       compat/crypt/sha256.c" >>$CONFIG_MK
 else
        echo "SHA256_SRC=" >>$CONFIG_MK
        echo "#define SHA2_H            <$SHA2_H>" >>$CONFIG_H
index 625b027e62f51c0a2bfe4def2710186abcf19297..30e586f359ce33e02d4492de1288d6b25906d5bd 100644 (file)
@@ -19,7 +19,8 @@ SRCS+=                ${DHCPCD_SRCS}
 DHCPCD_DEFS?=  dhcpcd-definitions.conf
 
 PCOMPAT_SRCS=  ${COMPAT_SRCS:compat/%=${TOP}/compat/%}
-OBJS+=         ${SRCS:.c=.o} ${CRYPT_SRCS:.c=.o} ${PCOMPAT_SRCS:.c=.o}
+PCRYPT_SRCS=   ${CRYPT_SRCS:compat/%=${TOP}/compat/%}
+OBJS+=         ${SRCS:.c=.o} ${PCRYPT_SRCS:.c=.o} ${PCOMPAT_SRCS:.c=.o}
 
 MAN5=          dhcpcd.conf.5
 MAN8=          dhcpcd.8
index 476bf647e3c86009aa7a2cc7e86187da0ca8798a..4f68cb3a122ce140c21882c9491b019cc934ebae 100644 (file)
 #include <inttypes.h>
 #include <string.h>
 
+#include "config.h"
 #include "crypt.h"
 
-#include "../config.h"
 #ifdef HAVE_MD5_H
 #  ifndef DEPGEN
 #    include <md5.h>
 #  endif
-#else
-#  include "md5.h"
 #endif
 
 #define HMAC_PAD_LEN   64
index a25fddefe30eb5c9870b1de71a71dcedf90a6a2d..6b1a529d392d14d5903cab2dc8e7dfc58f77d17f 100644 (file)
 #  ifndef DEPGEN
 #    include <md5.h>
 #  endif
-#else
-#  include "md5.h"
 #endif
 
 #ifdef SHA2_H
 #  include SHA2_H
-#else
-#  include "sha256.h"
 #endif
 
 #ifndef SHA256_DIGEST_LENGTH