変愚蛮怒のメインリポジトリです
Revision | 5878ea0923c83ca10332ab7e67d56e9b72ea58ab (tree) |
---|---|
Time | 2002-01-18 00:37:00 |
Author | mogami <mogami@0568...> |
Commiter | mogami |
vasprint()関数の存在を ./configure を使って知るように修正。
@@ -73,6 +73,6 @@ AC_FUNC_MEMCMP | ||
73 | 73 | AC_TYPE_SIGNAL |
74 | 74 | AC_FUNC_STRFTIME |
75 | 75 | AC_FUNC_VPRINTF |
76 | -AC_CHECK_FUNCS(gethostname mkdir select socket strdup strstr strtol) | |
76 | +AC_CHECK_FUNCS(gethostname mkdir select socket strdup strstr strtol vasprintf vsnprintf) | |
77 | 77 | |
78 | 78 | AC_OUTPUT(Makefile src/Makefile lib/Makefile lib/apex/Makefile lib/bone/Makefile lib/data/Makefile lib/edit/Makefile lib/file/Makefile lib/help/Makefile lib/info/Makefile lib/pref/Makefile lib/save/Makefile lib/script/Makefile lib/user/Makefile lib/xtra/Makefile lib/xtra/font/Makefile lib/xtra/graf/Makefile lib/xtra/music/Makefile lib/xtra/sound/Makefile) |
@@ -47,11 +47,10 @@ typedef struct { | ||
47 | 47 | |
48 | 48 | #define BUFSIZE (65536) |
49 | 49 | |
50 | -#if defined(WINDOWS) || defined(SUNOS4) || defined(MACINTOSH) || defined(SGI) | |
50 | +#ifndef HAVE_VASPRINTF | |
51 | 51 | #define vasprintf Vasprintf |
52 | -#endif | |
53 | 52 | |
54 | -#ifdef SUNOS4 | |
53 | +#if defined(HAVE_VSNPRINTF) | |
55 | 54 | static int Vasprintf(char **buf, const char *fmt, va_list ap) |
56 | 55 | { |
57 | 56 | int ret; |
@@ -62,9 +61,7 @@ static int Vasprintf(char **buf, const char *fmt, va_list ap) | ||
62 | 61 | |
63 | 62 | return ret; |
64 | 63 | } |
65 | -#endif | |
66 | - | |
67 | -#if defined(WINDOWS) || defined(MACINTOSH) || defined(SGI) | |
64 | +#else | |
68 | 65 | static int Vasprintf(char **buf, const char *fmt, va_list ap) |
69 | 66 | { |
70 | 67 | int ret; |
@@ -76,6 +73,8 @@ static int Vasprintf(char **buf, const char *fmt, va_list ap) | ||
76 | 73 | } |
77 | 74 | #endif |
78 | 75 | |
76 | +#endif /* ifndef HAVE_VASPRINTF */ | |
77 | + | |
79 | 78 | static BUF* buf_new(void) |
80 | 79 | { |
81 | 80 | BUF *p; |