c99 and endian changes for centos
This commit is contained in:
parent
0d0c9bde53
commit
9776ff15a0
7 changed files with 12 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../../include -g3
|
||||
CFLAGS = -O0 -I../../include -g3 -std=c99
|
||||
LFLAGS =
|
||||
DEPS = ../../include/libp2p/crypto/encoding/base58.h ../../include/libp2p/crypto/encoding/base64.h \
|
||||
../../include/libp2p/crypto/encoding/x509.h ../../include/libp2p/crypto/encoding/base16.h \
|
||||
|
|
|
@ -100,6 +100,11 @@ void SHA1_Transform(uint32_t state[5], const uint8_t buffer[64]);
|
|||
|
||||
/* blk0() and blk() perform the initial expand. */
|
||||
/* I got the idea of expanding during the round function from SSLeay */
|
||||
// NOTE: Need to do endianness better
|
||||
#if (!defined(__BYTE_ORDER__))
|
||||
#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
|
||||
#endif
|
||||
|
||||
#if (defined(__BYTE_ORDER__)&&(__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__))
|
||||
#define blk0(i) block->l[i]
|
||||
#elif (defined(__BYTE_ORDER__)&&(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__))
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define P2PNET_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int socket_open4();
|
||||
int socket_bind4(int s, uint32_t ip, uint16_t port);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -I../../c-multiaddr/include -g3
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -I../../c-multiaddr/include -g3 -std=c99
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = peer.o peerstore.o providerstore.o
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-protobuf
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-protobuf -std=c99
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I. -I../../c-multihash/include -I../../c-multiaddr/include
|
||||
CFLAGS = -O0 -I../include -I. -I../../c-multihash/include -I../../c-multiaddr/include -std=c99
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
@ -25,4 +25,4 @@ clean:
|
|||
rm -f *.o
|
||||
rm -f testit_libp2p
|
||||
|
||||
test: clean testit_libp2p
|
||||
test: clean testit_libp2p
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-multiaddr/include
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-multiaddr/include -std=c99
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
Loading…
Reference in a new issue