OSDN Git Service

defined __extension__ as empty.
[lha/lha.git] / src / cproto.sh
1 #!/bin/sh
2
3 exec 5>&1 > prototypes.h.tmp
4
5 cat <<END
6 /* This file was generated by cproto. */
7 #if PROTOTYPES /* defined in config.h */
8 #define P_(s) s
9 #else
10 #define P_(s) ()
11 #endif
12
13 END
14
15 cproto -m -d \
16         -D STDC_HEADERS=1 -D HAVE_STRDUP=0 -D HAVE_MEMSET=0 -D HAVE_MEMMOVE=0 \
17         -D MULTIBYTE_FILENAME=1 -D RETSIGTYPE=void -D __extension__='' \
18         -D NEED_INCREMENTAL_INDICATOR=1 \
19         append.c crcio.c dhuf.c extract.c header.c \
20         huf.c larc.c lhadd.c lharc.c lhext.c \
21         lhlist.c maketbl.c maketree.c patmatch.c \
22         shuf.c slide.c util.c
23
24 cat <<END
25
26 /* lharc.c */
27 RETSIGTYPE interrupt(int signo);
28 /* util.c */
29 #if !HAVE_MEMMOVE
30 void *memmove P_((void *dst, const void *src, size_t cnt));
31 #endif
32 #if !HAVE_STRDUP
33 char *strdup P_((char *buf));
34 #endif
35 #if !HAVE_MEMSET
36 char *memset P_((char *s, int c, int n));
37 #endif
38
39 /* vsnprintf.c */
40 #if !HAVE_VSNPRINTF
41 int vsnprintf P_((char *str, size_t n, const char *fmt, va_list ap));
42 int snprintf P_((char *str, size_t n, char const *fmt, ...));
43 #endif
44
45 #undef P_
46 END
47
48 exec 1>&5
49 mv prototypes.h.tmp prototypes.h