Jeff Thompson | c868dd0 | 2013-09-24 15:50:47 -0700 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (C) 2013 Regents of the University of California. |
| 3 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef NDN_COMMON_H |
| 8 | #define NDN_COMMON_H |
| 9 | |
| 10 | #include "../../config.h" |
| 11 | |
| 12 | // Need to define uint8_t. There may be no stdint.h because it is only part of the C standard since 1999. |
| 13 | #if HAVE_STDINT |
| 14 | #include <stdint.h> |
| 15 | #else |
| 16 | #endif |
| 17 | #ifndef _UINT8_T |
| 18 | #define _UINT8_T |
| 19 | typedef unsigned char uint8_t; |
| 20 | #endif |
| 21 | |
Jeff Thompson | 08ecc23 | 2013-09-24 17:01:51 -0700 | [diff] [blame] | 22 | #if HAVE_MEMCMP || HAVE_MEMCPY || HAVE_MEMSET |
| 23 | // size_t is defined in memory.h, or something it includes. |
| 24 | #include <memory.h> |
| 25 | #else |
| 26 | // Need to define size_t. |
| 27 | #ifndef _SIZE_T |
| 28 | #define _SIZE_T |
| 29 | typedef unsigned int size_t; |
| 30 | #endif |
| 31 | #endif |
| 32 | |
Jeff Thompson | c868dd0 | 2013-09-24 15:50:47 -0700 | [diff] [blame] | 33 | #ifdef __cplusplus |
| 34 | extern "C" { |
| 35 | #endif |
| 36 | |
| 37 | |
| 38 | |
| 39 | #ifdef __cplusplus |
| 40 | } |
| 41 | #endif |
| 42 | |
| 43 | #endif |