diff options
author | unknown <wax@mysql.com> | 2003-08-10 05:38:08 +0600 |
---|---|---|
committer | unknown <wax@mysql.com> | 2003-08-10 05:38:08 +0600 |
commit | 22cb4fbc4df0136f0d86aaba14ad2990905f9370 (patch) | |
tree | 0bac3b638f8bb5b053b6b3bd6da99b7a9ef71d52 /mysys | |
parent | 4d08fc1a37a5356e53898760ce20f9989e8d45f0 (diff) | |
download | mariadb-git-22cb4fbc4df0136f0d86aaba14ad2990905f9370.tar.gz |
BUG
replace HAVE_SETFILEPOINTER with __WIN__
include/config-win.h:
remove HAVE_SETFILEPOINTER
mysys/my_chsize.c:
replace HAVE_SETFILEPOINTER with __WIN__
move __WIN__ section to up
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_chsize.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/mysys/my_chsize.c b/mysys/my_chsize.c index 0840a7a69e4..5708ac5b253 100644 --- a/mysys/my_chsize.c +++ b/mysys/my_chsize.c @@ -49,24 +49,7 @@ int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags) oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE)); DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize)); -#ifdef HAVE_CHSIZE - if (oldsize > newlength || filler == 0) - { - if (chsize(fd,(off_t) newlength)) - { - DBUG_PRINT("error",("errno: %d",errno)); - my_errno=errno; - if (MyFlags & MY_WME) - my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno); - DBUG_RETURN(1); - } - else - { - if (filler == 0) - DBUG_RETURN(0); - } - } -#elif defined(HAVE_SETFILEPOINTER) +#ifdef __WIN__ if (oldsize > newlength) { LARGE_INTEGER new_length; @@ -84,6 +67,23 @@ int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags) my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno); DBUG_RETURN(1); } +#elif define(HAVE_CHSIZE) + if (oldsize > newlength || filler == 0) + { + if (chsize(fd,(off_t) newlength)) + { + DBUG_PRINT("error",("errno: %d",errno)); + my_errno=errno; + if (MyFlags & MY_WME) + my_error(EE_CANT_CHSIZE,MYF(ME_BELL+ME_WAITTANG),errno); + DBUG_RETURN(1); + } + else + { + if (filler == 0) + DBUG_RETURN(0); + } + } #elif defined(HAVE_FTRUNCATE) if (oldsize > newlength) { |