diff --git a/ChangeLog b/ChangeLog index 2f59163ee8..5c5d08dbcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sat Aug 27 19:04:06 2011 NARUSE, Yui + + * internal.h (rb_strftime_timespec): moved from time.c and define only + if ruby/encoding.h is included. + + * internal.h (rb_strftime): ditto. + Sat Aug 27 18:53:51 2011 Kazuki Tsujimoto * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure. diff --git a/internal.h b/internal.h index 3bd4d6a639..576ec32699 100644 --- a/internal.h +++ b/internal.h @@ -157,6 +157,14 @@ VALUE rb_reg_check_preprocess(VALUE); /* signal.c */ int rb_get_next_signal(void); +/* strftime.c */ +#ifdef RUBY_ENCODING_H +size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc, + const struct vtm *vtm, struct timespec *ts, int gmt); +size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc, + const struct vtm *vtm, VALUE timev, int gmt); +#endif + /* string.c */ int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p); diff --git a/time.c b/time.c index c47b3569a0..f74b3c7b29 100644 --- a/time.c +++ b/time.c @@ -16,9 +16,6 @@ #include "ruby/encoding.h" #include "internal.h" -/* strftime.c */ -size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc, const struct vtm *vtm, struct timespec *ts, int gmt); - #ifdef HAVE_UNISTD_H #include #endif @@ -4286,10 +4283,6 @@ time_to_a(VALUE time) time_zone(time)); } -size_t -rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc, - const struct vtm *vtm, VALUE timev, int gmt); - #define SMALLBUF 100 static size_t rb_strftime_alloc(char **buf, const char *format, rb_encoding *enc,