From 6bc83a18b74844acff9e664ff2983f00181d577b Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 27 Aug 2011 10:06:25 +0000 Subject: * internal.h (rb_strftime_timespec): moved from time.c and define only if ruby/encoding.h is included. * internal.h (rb_strftime): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ internal.h | 8 ++++++++ time.c | 7 ------- 3 files changed, 15 insertions(+), 7 deletions(-) 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, -- cgit v1.2.3