From 2fcd221fecabe3e6acaa21c54ae6d1ccbe8c0204 Mon Sep 17 00:00:00 2001 From: eban Date: Wed, 27 Feb 2002 04:30:20 +0000 Subject: [PATCH] * io.c (READ_DATA_PENDING): uClibc support. * random.c (rand_init): ditto. * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ ext/socket/addrinfo.h | 2 +- ext/socket/getaddrinfo.c | 2 +- io.c | 2 ++ random.c | 2 +- version.h | 4 ++-- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9faccdd9c..8fe7445a81 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Feb 27 13:18:49 2002 WATANABE Hirofumi + + * io.c (READ_DATA_PENDING): uClibc support. + + * random.c (rand_init): ditto. + + * ext/socket/{addinfo.h,getaddrinfo.c} (gai_strerror): ditto. + Wed Feb 27 07:05:17 2002 Akinori MUSHA * ext/digest/sha2/sha2.c: Merge from rough. Fix a couple of diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h index 6000a466ba..aaa309cfdd 100644 --- a/ext/socket/addrinfo.h +++ b/ext/socket/addrinfo.h @@ -154,7 +154,7 @@ extern int getnameinfo __P(( extern void freehostent __P((struct hostent *)); extern void freeaddrent __P((struct addrinfo *)); -extern char *gai_strerror __P((int)); +extern const char *gai_strerror __P((int)); /* In case there is no definition of offsetof() provided - though any proper Standard C system should have one. */ diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index d518017bc8..863d31ea6e 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -191,7 +191,7 @@ if (pai->ai_flags & AI_CANONNAME) {\ #define ERR(err) { error = (err); goto bad; } -char * +const char * gai_strerror(ecode) int ecode; { diff --git a/io.c b/io.c index 6829efff1c..47243563a6 100644 --- a/io.c +++ b/io.c @@ -119,6 +119,8 @@ static VALUE lineno; # define READ_DATA_PENDING_COUNT(fp) ((fp)->FILE_COUNT) #elif defined(__BEOS__) # define READ_DATA_PENDING(fp) (fp->_state._eof == 0) +#elif defined(__UCLIBC__) +# define READ_DATA_PENDING(fp) ((fp)->bufpos < (fp)->bufend) #else /* requires systems own version of the ReadDataPending() */ extern int ReadDataPending(); diff --git a/random.c b/random.c index 4e9213ebc4..e76437285b 100644 --- a/random.c +++ b/random.c @@ -88,7 +88,7 @@ rand_init(seed) int old; static unsigned int saved_seed; -#ifdef HAVE_RANDOM +#if defined HAVE_RANDOM && !defined __UCLIBC__ if (first == 1) { initstate(1, state, sizeof state); } diff --git a/version.h b/version.h index e78570ff9d..2c687c39a6 100644 --- a/version.h +++ b/version.h @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.7.2" -#define RUBY_RELEASE_DATE "2002-02-26" +#define RUBY_RELEASE_DATE "2002-02-27" #define RUBY_VERSION_CODE 172 -#define RUBY_RELEASE_CODE 20020226 +#define RUBY_RELEASE_CODE 20020227