[前][次][番号順一覧][スレッド一覧]

ruby-changes:8566

From: nobu <ko1@a...>
Date: Mon, 3 Nov 2008 16:34:05 +0900 (JST)
Subject: [ruby-changes:8566] Ruby:r20101 (trunk, ruby_1_8): * missing.h: needs RUBY_EXTERN instead of extern for mswin.

nobu	2008-11-03 16:32:57 +0900 (Mon, 03 Nov 2008)

  New Revision: 20101

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20101

  Log:
    * missing.h: needs RUBY_EXTERN instead of extern for mswin.

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/missing.h
    trunk/ChangeLog
    trunk/include/ruby/missing.h

Index: include/ruby/missing.h
===================================================================
--- include/ruby/missing.h	(revision 20100)
+++ include/ruby/missing.h	(revision 20101)
@@ -38,57 +38,61 @@
 };
 #endif
 
+#ifndef RUBY_EXTERN
+#define RUBY_EXTERN extern
+#endif
+
 #ifndef HAVE_ACOSH
-extern double acosh(double);
-extern double asinh(double);
-extern double atanh(double);
+RUBY_EXTERN double acosh(double);
+RUBY_EXTERN double asinh(double);
+RUBY_EXTERN double atanh(double);
 #endif
 
 #ifndef HAVE_CRYPT
-extern char *crypt(const char *, const char *);
+RUBY_EXTERN char *crypt(const char *, const char *);
 #endif
 
 #ifndef HAVE_DUP2
-extern int dup2(int, int);
+RUBY_EXTERN int dup2(int, int);
 #endif
 
 #ifndef HAVE_EACCESS
-extern int eaccess(const char*, int);
+RUBY_EXTERN int eaccess(const char*, int);
 #endif
 
 #ifndef HAVE_FINITE
-extern int finite(double);
+RUBY_EXTERN int finite(double);
 #endif
 
 #ifndef HAVE_FLOCK
-extern int flock(int, int);
+RUBY_EXTERN int flock(int, int);
 #endif
 
 /*
 #ifndef HAVE_FREXP
-extern double frexp(double, int *);
+RUBY_EXTERN double frexp(double, int *);
 #endif
 */
 
 #ifndef HAVE_HYPOT
-extern double hypot(double, double);
+RUBY_EXTERN double hypot(double, double);
 #endif
 
 #ifndef HAVE_ERF
-extern double erf(double);
-extern double erfc(double);
+RUBY_EXTERN double erf(double);
+RUBY_EXTERN double erfc(double);
 #endif
 
 #ifndef HAVE_TGAMMA
-extern double tgamma(double);
+RUBY_EXTERN double tgamma(double);
 #endif
 
 #ifndef HAVE_LGAMMA_R
-extern double lgamma_r(double, int *);
+RUBY_EXTERN double lgamma_r(double, int *);
 #endif
 
 #ifndef HAVE_CBRT
-extern double cbrt(double);
+RUBY_EXTERN double cbrt(double);
 #endif
 
 #ifndef isinf
@@ -96,62 +100,62 @@
 #  if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
 #  define isinf(x) (!finite(x) && !isnan(x))
 #  else
-extern int isinf(double);
+RUBY_EXTERN int isinf(double);
 #  endif
 # endif
 #endif
 
 #ifndef HAVE_ISNAN
-extern int isnan(double);
+RUBY_EXTERN int isnan(double);
 #endif
 
 /*
 #ifndef HAVE_MEMCMP
-extern int memcmp(const void *, const void *, size_t);
+RUBY_EXTERN int memcmp(const void *, const void *, size_t);
 #endif
 */
 
 #ifndef HAVE_MEMMOVE
-extern void *memmove(void *, const void *, size_t);
+RUBY_EXTERN void *memmove(void *, const void *, size_t);
 #endif
 
 /*
 #ifndef HAVE_MODF
-extern double modf(double, double *);
+RUBY_EXTERN double modf(double, double *);
 #endif
 */
 
 #ifndef HAVE_STRCHR
-extern char *strchr(const char *, int);
-extern char *strrchr(const char *, int);
+RUBY_EXTERN char *strchr(const char *, int);
+RUBY_EXTERN char *strrchr(const char *, int);
 #endif
 
 #ifndef HAVE_STRERROR
-extern char *strerror(int);
+RUBY_EXTERN char *strerror(int);
 #endif
 
 #ifndef HAVE_STRSTR
-extern char *strstr(const char *, const char *);
+RUBY_EXTERN char *strstr(const char *, const char *);
 #endif
 
 /*
 #ifndef HAVE_STRTOL
-extern long strtol(const char *, char **, int);
+RUBY_EXTERN long strtol(const char *, char **, int);
 #endif
 */
 
 #ifndef HAVE_VSNPRINTF
 # include <stdarg.h>
-extern int snprintf(char *, size_t n, char const *, ...);
-extern int vsnprintf(char *, size_t n, char const *, va_list);
+RUBY_EXTERN int snprintf(char *, size_t n, char const *, ...);
+RUBY_EXTERN int vsnprintf(char *, size_t n, char const *, va_list);
 #endif
 
 #ifndef HAVE_STRLCPY
-extern size_t strlcpy(char *, const char*, size_t);
+RUBY_EXTERN size_t strlcpy(char *, const char*, size_t);
 #endif
 
 #ifndef HAVE_STRLCAT
-extern size_t strlcat(char *, const char*, size_t);
+RUBY_EXTERN size_t strlcat(char *, const char*, size_t);
 #endif
 
 #if defined(__cplusplus)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20100)
+++ ChangeLog	(revision 20101)
@@ -1,3 +1,7 @@
+Mon Nov  3 16:32:54 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* missing.h: needs RUBY_EXTERN instead of extern for mswin.
+
 Mon Nov  3 13:01:13 2008  Yuki Sonoda (Yugui)  <yugui@y...>
 
 	* array.c (rb_ary_take_first_or_last): renamed rb_ary_partial more
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20100)
+++ ruby_1_8/ChangeLog	(revision 20101)
@@ -1,3 +1,7 @@
+Mon Nov  3 16:32:54 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* missing.h: needs RUBY_EXTERN instead of extern for mswin.
+
 Mon Nov  3 16:18:00 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in (XLDFLAGS): added --enable-auto-import for cygwin and
Index: ruby_1_8/missing.h
===================================================================
--- ruby_1_8/missing.h	(revision 20100)
+++ ruby_1_8/missing.h	(revision 20101)
@@ -25,108 +25,112 @@
 #  include <sys/types.h>
 #endif
 
+#ifndef RUBY_EXTERN
+#define RUBY_EXTERN extern
+#endif
+
 #ifndef HAVE_ACOSH
-extern double acosh _((double));
-extern double asinh _((double));
-extern double atanh _((double));
+RUBY_EXTERN double acosh _((double));
+RUBY_EXTERN double asinh _((double));
+RUBY_EXTERN double atanh _((double));
 #endif
 
 #ifndef HAVE_CRYPT
-extern char *crypt _((const char *, const char *));
+RUBY_EXTERN char *crypt _((const char *, const char *));
 #endif
 
 #ifndef HAVE_DUP2
-extern int dup2 _((int, int));
+RUBY_EXTERN int dup2 _((int, int));
 #endif
 
 #ifndef HAVE_EACCESS
-extern int eaccess _((const char*, int));
+RUBY_EXTERN int eaccess _((const char*, int));
 #endif
 
 #ifndef HAVE_FINITE
-extern int finite _((double));
+RUBY_EXTERN int finite _((double));
 #endif
 
 #ifndef HAVE_FLOCK
-extern int flock _((int, int));
+RUBY_EXTERN int flock _((int, int));
 #endif
 
 /*
 #ifndef HAVE_FREXP
-extern double frexp _((double, int *));
+RUBY_EXTERN double frexp _((double, int *));
 #endif
 */
 
 #ifndef HAVE_HYPOT
-extern double hypot _((double, double));
+RUBY_EXTERN double hypot _((double, double));
 #endif
 
 #ifndef HAVE_ERF
-extern double erf _((double));
-extern double erfc _((double));
+RUBY_EXTERN double erf _((double));
+RUBY_EXTERN double erfc _((double));
 #endif
 
 #ifndef HAVE_ISINF
 # if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
 # define isinf(x) (!finite(x) && !isnan(x))
 # else
-extern int isinf _((double));
+RUBY_EXTERN int isinf _((double));
 # endif
 #endif
 
 #ifndef HAVE_ISNAN
-extern int isnan _((double));
+RUBY_EXTERN int isnan _((double));
 #endif
 
 /*
 #ifndef HAVE_MEMCMP
-extern int memcmp _((char *, char *, int));
+RUBY_EXTERN int memcmp _((char *, char *, int));
 #endif
 */
 
 #ifndef HAVE_MEMMOVE
-extern void *memmove _((void *, void *, int));
+RUBY_EXTERN void *memmove _((void *, void *, int));
 #endif
 
 /*
 #ifndef HAVE_MODF
-extern double modf _((double, double *));
+RUBY_EXTERN double modf _((double, double *));
 #endif
 */
 
 #ifndef HAVE_STRCASECMP
-extern int strcasecmp _((char *, char *));
+RUBY_EXTERN int strcasecmp _((char *, char *));
 #endif
 
 #ifndef HAVE_STRNCASECMP
-extern int strncasecmp _((char *, char *, int));
+RUBY_EXTERN int strncasecmp _((char *, char *, int));
 #endif
 
 #ifndef HAVE_STRCHR
-extern char *strchr _((char *, int));
-extern char *strrchr _((char *, int));
+RUBY_EXTERN char *strchr _((char *, int));
+RUBY_EXTERN char *strrchr _((char *, int));
 #endif
 
 #ifndef HAVE_STRERROR
-extern char *strerror _((int));
+RUBY_EXTERN char *strerror _((int));
 #endif
 
 #ifndef HAVE_STRFTIME
-extern size_t strftime _((char *, size_t, const char *, const struct tm *));
+RUBY_EXTERN size_t strftime _((char *, size_t, const char *, const struct tm *));
 #endif
 
 #ifndef HAVE_STRSTR
-extern char *strstr _((char *, char *));
+RUBY_EXTERN char *strstr _((char *, char *));
 #endif
 
 /*
 #ifndef HAVE_STRTOL
-extern long strtol _((char *, char **, int));
+RUBY_EXTERN long strtol _((char *, char **, int));
 #endif
 */
 
 #ifndef HAVE_STRTOUL
-extern unsigned long strtoul _((char *, char **, int));
+RUBY_EXTERN unsigned long strtoul _((char *, char **, int));
 #endif
 
 #ifndef HAVE_VSNPRINTF
@@ -135,8 +139,8 @@
 # else
 #  include <varargs.h>
 # endif
-extern int snprintf __((char *, size_t n, char const *, ...));
-extern int vsnprintf _((char *, size_t n, char const *, va_list));
+RUBY_EXTERN int snprintf __((char *, size_t n, char const *, ...));
+RUBY_EXTERN int vsnprintf _((char *, size_t n, char const *, va_list));
 #endif
 
 #endif /* MISSING_H */

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]