projects
/
fw
/
openocd
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Missing type for eCos.
[fw/openocd]
/
src
/
helper
/
types.h
diff --git
a/src/helper/types.h
b/src/helper/types.h
index 75b2ad1b863bdcc3b860896fd7dfe19b77339996..86b62c23a7b3c28a411c8454e63f9542318d6b67 100644
(file)
--- a/
src/helper/types.h
+++ b/
src/helper/types.h
@@
-2,7
+2,7
@@
* Copyright (C) 2004, 2005 by Dominic Rath *
* Dominic.Rath@gmx.de *
* *
* Copyright (C) 2004, 2005 by Dominic Rath *
* Dominic.Rath@gmx.de *
* *
- * Copyright (C) 2007,2008
Ø
yvind Harboe *
+ * Copyright (C) 2007,2008
Ø
yvind Harboe *
* oyvind.harboe@zylin.com *
* *
* This program is free software; you can redistribute it and/or modify *
* oyvind.harboe@zylin.com *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-26,7
+26,12
@@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#ifdef HAVE_STDINT_H
#include <stdint.h>
#include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
typedef struct jtag_tap_s jtag_tap_t;
typedef struct jtag_tap_s jtag_tap_t;
@@
-119,8
+124,18
@@
static inline void h_u16_to_be(uint8_t* buf, int val)
}
#ifdef __ECOS
}
#ifdef __ECOS
+/* eCos plain lacks these definition... A series of upstream patches
+ * could probably repair it, but it seems like too much work to be
+ * worth it.
+ */
+
+
+#define PRIx32 "x"
+#define PRId32 "d"
+#define SCNx32 "x"
+#define PRIi32 "i"
+#define PRIu32 "u"
-/* eCos plain lacks this definition... */
typedef CYG_ADDRWORD intptr_t;
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
typedef CYG_ADDRWORD intptr_t;
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
@@
-137,7
+152,10
@@
typedef uint64_t uintmax_t;
#define INT64_MIN (-INT64_MAX - 1LL)
#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
#define INT64_MIN (-INT64_MAX - 1LL)
#define UINT64_MAX (__CONCAT(INT64_MAX, U) * 2ULL + 1ULL)
+#define ULLONG_MAX 18446744073709551615
+/* C99, eCos is C90 compliant (with bits of C99) */
+#define isblank(c) ((c) == ' ' || (c) == '\t')
#endif
#endif