* include/ruby/win32.h: VC doesn't have ftruncate() and others, but

ruby needs HAVE_ macros to use our emulation functions.
  (fix the problem of 31262)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2011-04-12 01:39:39 +00:00
parent ace092cb7a
commit c3b81f63e7
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,9 @@
Tue Apr 12 10:37:39 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* include/ruby/win32.h: VC doesn't have ftruncate() and others, but
ruby needs HAVE_ macros to use our emulation functions.
(fix the problem of 31262)
Tue Apr 12 01:33:00 2011 Luis Lavena <luislavena@gmail.com> Tue Apr 12 01:33:00 2011 Luis Lavena <luislavena@gmail.com>
* configure.in: properly evaluate existence of truncate, ftruncate * configure.in: properly evaluate existence of truncate, ftruncate

View file

@ -382,19 +382,19 @@ scalb(double a, long b)
#define SUFFIX #define SUFFIX
#if !defined HAVE_FTRUNCATE #if !defined HAVE_FTRUNCATE || defined(_MSC_VER)
#define ftruncate rb_w32_ftruncate #define ftruncate rb_w32_ftruncate
extern int rb_w32_ftruncate(int fd, off_t length); extern int rb_w32_ftruncate(int fd, off_t length);
#endif #endif
#if !defined HAVE_TRUNCATE #if !defined HAVE_TRUNCATE || defined(_MSC_VER)
#define truncate rb_w32_truncate #define truncate rb_w32_truncate
extern int rb_w32_truncate(const char *path, off_t length); extern int rb_w32_truncate(const char *path, off_t length);
#endif #endif
extern int fseeko(FILE *stream, off_t offset, int whence); extern int fseeko(FILE *stream, off_t offset, int whence);
#if !defined HAVE_FTELLO #if !defined HAVE_FTELLO || defined(_MSC_VER)
#define ftello rb_w32_ftello #define ftello rb_w32_ftello
extern off_t rb_w32_ftello(FILE *stream); extern off_t rb_w32_ftello(FILE *stream);
#endif #endif