diff options
author | Claudio Fontana <claudio.fontana@huawei.com> | 2013-09-18 15:29:09 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-04-25 13:07:15 +0100 |
commit | fb23958d938f8c75f1fc63b3616240d67aaf5a97 (patch) | |
tree | eefd6a2051845ef4400df686526a5edc38a0ae85 /risu.h | |
parent | 4aec4538c8ff3c687943bd3b1bacc8705382d9e1 (diff) |
configure: add a configuration step, prepare for 64bit compilation
adjust some types to be able to compile successfully on 64 bit.
To make it cleanly, add a configure step to check for the
appropriate types to use.
Signed-off-by: Claudio Fontana <claudio.fontana@linaro.org>
Diffstat (limited to 'risu.h')
-rw-r--r-- | risu.h | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -12,18 +12,27 @@ #ifndef RISU_H #define RISU_H -#include <stdint.h> +#include <inttypes.h> + +#include "config.h" + +#ifndef HAVE_SOCKLEN_T +#define socklen_t int +#endif /* HAVE_SOCKLEN_T */ + +#ifndef HAVE_UINTPTR_T +#define uintptr_t size_t +#endif /* HAVE_UINTPTR_T */ /* Socket related routines */ -int master_connect(uint16_t port); -int apprentice_connect(const char *hostname, uint16_t port); +int master_connect(int port); +int apprentice_connect(const char *hostname, int port); int send_data_pkt(int sock, void *pkt, int pktlen); int recv_data_pkt(int sock, void *pkt, int pktlen); void send_response_byte(int sock, int resp); -extern uint32_t image_start_address; - -extern uint8_t *memblock; +extern uintptr_t image_start_address; +extern void *memblock; extern int test_fp_exc; |