summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorluislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-11 16:38:10 +0000
committerluislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-04-11 16:38:10 +0000
commitc2bfeaa2449671a4dcea16e09c6bc3e7c7095456 (patch)
treeb6395864ca824527dbb7b196b7ca48f310cc7735 /include
parent0f771e33e2c3be4bc6316d6f4a930ba67ed0a9a3 (diff)
Evaluate truncate, ftruncate and ftello existence
This corrects mingw-w64 compilation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/win32.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index 791085fa6c..d822a016dc 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -381,11 +381,23 @@ scalb(double a, long b)
//
#define SUFFIX
+
+#if !defined HAVE_FTRUNCATE
#define ftruncate rb_w32_ftruncate
-extern int truncate(const char *path, off_t length);
-extern int ftruncate(int fd, off_t length);
+extern int rb_w32_ftruncate(int fd, off_t length);
+#endif
+
+#if !defined HAVE_TRUNCATE
+#define truncate rb_w32_truncate
+extern int rb_w32_truncate(const char *path, off_t length);
+#endif
+
extern int fseeko(FILE *stream, off_t offset, int whence);
-extern off_t ftello(FILE *stream);
+
+#if !defined HAVE_FTELLO
+#define ftello rb_w32_ftello
+extern off_t rb_w32_ftello(FILE *stream);
+#endif
//
// stubs