Index: trunk/tools/trickle/trickle.h |
— | — | @@ -13,6 +13,11 @@ |
14 | 14 | |
15 | 15 | #include <stdio.h> |
16 | 16 | |
| 17 | +#include "t_stdint.h" |
| 18 | +#ifdef T_STDINT |
| 19 | +# include <stdint.h> |
| 20 | +#endif |
| 21 | + |
17 | 22 | #define min(x,y) ((x) < (y) ? (x) : (y)) |
18 | 23 | #define max(x,y) ((x) < (y) ? (y) : (x)) |
19 | 24 | |
Index: trunk/tools/trickle/proto.c |
— | — | @@ -16,6 +16,11 @@ |
17 | 17 | #include <stdio.h> |
18 | 18 | #include <strings.h> |
19 | 19 | |
| 20 | +#include "t_stdint.h" |
| 21 | +#ifdef T_STDINT |
| 22 | +# include <stdint.h> |
| 23 | +#endif |
| 24 | + |
20 | 25 | #include "trickle.h" |
21 | 26 | #include "rdcp.h" |
22 | 27 | |
Index: trunk/tools/trickle/rdcp.c |
— | — | @@ -10,8 +10,12 @@ |
11 | 11 | #include <stdlib.h> |
12 | 12 | #include <unistd.h> |
13 | 13 | #include <alloca.h> |
14 | | -#include <xti.h> |
15 | 14 | |
| 15 | +#include "t_stdint.h" |
| 16 | +#ifdef T_STDINT |
| 17 | +# include <stdint.h> |
| 18 | +#endif |
| 19 | + |
16 | 20 | #include "rdcp.h" |
17 | 21 | |
18 | 22 | #define F_CLOSED 1 |
Index: trunk/tools/trickle/Makefile |
— | — | @@ -1,9 +1,22 @@ |
2 | 2 | # @(#) $Header$ |
3 | 3 | |
4 | | -trickle: trickle.o tar.o proto.o util.o rdcp.o |
5 | | - cc -g trickle.o tar.o proto.o util.o rdcp.o -o $@ -lsocket -lnsl |
6 | | -.c.o: Makefile $< |
| 4 | +trickle: trickle.o tar.o proto.o util.o rdcp.o ldflags |
| 5 | + cc -g trickle.o tar.o proto.o util.o rdcp.o -o $@ `cat ldflags` |
| 6 | +%.o: %.c Makefile $< t_stdint.h |
7 | 7 | cc -g -D_FILE_OFFSET_BITS=64 -c $< |
8 | 8 | clean: |
9 | | - rm -f trickle trickle.o tar.o util.o rdcp.o proto.o |
| 9 | + rm -f trickle trickle.o tar.o util.o rdcp.o proto.o ldflags t_stdint.h |
| 10 | +t_stdint.h: |
| 11 | + rm -f t_stdint.h |
| 12 | + touch t_stdint.h |
| 13 | + echo "#include <stdint.h>" >test.c |
| 14 | + -cc -c -o /dev/null test.c && echo "#define T_STDINT 1" >>t_stdint.h |
| 15 | + rm -f test.c |
| 16 | +ldflags: |
| 17 | + rm -f ldflags |
| 18 | + touch ldflags |
| 19 | + echo "main(){}" > test.c |
| 20 | + -cc test.c -lsocket -lnsl -o /dev/null && echo -lsocket -lnsl >>ldflags |
| 21 | + rm -f test.c |
| 22 | + |
10 | 23 | .KEEP_STATE: |
Index: trunk/tools/trickle/rdcp.h |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | |
13 | 13 | #if defined(__SVR4) || defined(__svr4__) |
14 | 14 | # define RDCP_SVR4 |
| 15 | +# include <xti.h> |
15 | 16 | #endif |
16 | 17 | |
17 | 18 | /* |