mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in, {bcc32,win32,wince}/Makefile.sub (HAVE_SNPRINTF,
HAVE_VSNPRINTF): use win32/win32.c's implementation instead of missing/vsnprintf.c's. * win32/win32.[ch] (rb_w32_snprintf, rb_w32_vsnprintf): reverted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
378258bd0b
commit
ce8d9b4a0d
7 changed files with 41 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
Wed Aug 3 10:13:52 2005 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* configure.in, {bcc32,win32,wince}/Makefile.sub (HAVE_SNPRINTF,
|
||||
HAVE_VSNPRINTF): use win32/win32.c's implementation instead of
|
||||
missing/vsnprintf.c's.
|
||||
|
||||
* win32/win32.[ch] (rb_w32_snprintf, rb_w32_vsnprintf): reverted.
|
||||
|
||||
Wed Aug 3 10:05:08 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in: check vsnprintf() and snprintf().
|
||||
|
|
|
@ -252,6 +252,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)bcc32/Makefile.sub
|
|||
\#define HAVE_STRTOD 1
|
||||
\#define HAVE_STRTOL 1
|
||||
\#define HAVE_STRTOUL 1
|
||||
\#define HAVE_SNPRINTF 1
|
||||
\#define HAVE_VSNPRINTF 1
|
||||
\#define HAVE_ISNAN 1
|
||||
\#define HAVE_FINITE 1
|
||||
\#define HAVE_FMOD 1
|
||||
|
|
|
@ -353,6 +353,8 @@ mingw*) LIBS="-lshell32 -lws2_32 $LIBS"
|
|||
ac_cv_func_times=yes
|
||||
ac_cv_func_waitpid=yes
|
||||
ac_cv_func_fsync=yes
|
||||
ac_cv_func_snprintf=yes
|
||||
ac_cv_func_vsnprintf=yes
|
||||
ac_cv_func_seekdir=yes
|
||||
ac_cv_func_telldir=yes
|
||||
ac_cv_func_isinf=yes
|
||||
|
|
|
@ -248,6 +248,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub
|
|||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_FLOCK 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_ISNAN 1
|
||||
#define HAVE_FINITE 1
|
||||
#define HAVE_HYPOT 1
|
||||
|
|
|
@ -3599,6 +3599,26 @@ rb_w32_utime(const char *path, struct utimbuf *times)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
rb_w32_vsnprintf(char *buf, size_t size, const char *format, va_list va)
|
||||
{
|
||||
int ret = _vsnprintf(buf, size, format, va);
|
||||
if (size > 0) buf[size - 1] = 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
rb_w32_snprintf(char *buf, size_t size, const char *format, ...)
|
||||
{
|
||||
int ret;
|
||||
va_list va;
|
||||
|
||||
va_start(va, format);
|
||||
ret = vsnprintf(buf, size, format, va);
|
||||
va_end(va);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
rb_w32_mkdir(const char *path, int mode)
|
||||
{
|
||||
|
|
|
@ -178,6 +178,11 @@ extern int rb_w32_rename(const char *, const char *);
|
|||
extern char **rb_w32_get_environ(void);
|
||||
extern void rb_w32_free_environ(char **);
|
||||
|
||||
#define vsnprintf(s,n,f,l) rb_w32_vsnprintf(s,n,f,l)
|
||||
#define snprintf rb_w32_snprintf
|
||||
extern int rb_w32_vsnprintf(char *, size_t, const char *, va_list);
|
||||
extern int rb_w32_snprintf(char *, size_t, const char *, ...);
|
||||
|
||||
extern int chown(const char *, int, int);
|
||||
extern int link(const char *, const char *);
|
||||
extern int gettimeofday(struct timeval *, struct timezone *);
|
||||
|
|
|
@ -250,6 +250,8 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/wince/Makefile.sub
|
|||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_FLOCK 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_FINITE 1
|
||||
#define HAVE_HYPOT 1
|
||||
#define HAVE_FMOD 1
|
||||
|
|
Loading…
Add table
Reference in a new issue