[easytag] Remove unnecessary ftruncate() wrapper
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Remove unnecessary ftruncate() wrapper
- Date: Sun, 21 Dec 2014 10:59:25 +0000 (UTC)
commit dc66588abaaf528d55a9f447ea923760289a08b0
Author: David King <amigadave amigadave com>
Date: Sun Dec 21 09:55:26 2014 +0000
Remove unnecessary ftruncate() wrapper
configure.ac | 2 +-
src/win32/win32dep.c | 12 ------------
src/win32/win32dep.h | 5 -----
3 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 29fc4ae..1e8b635 100644
--- a/configure.ac
+++ b/configure.ac
@@ -388,7 +388,7 @@ AC_SUBST([DEPRECATED_CPPFLAGS], ["-DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SING
dnl -------------------------------
dnl Checks for library functions.
dnl -------------------------------
-AC_CHECK_FUNCS([ftruncate mkstemp truncate])
+AC_CHECK_FUNCS([mkstemp truncate])
GLIB_GSETTINGS
diff --git a/src/win32/win32dep.c b/src/win32/win32dep.c
index d8d05d1..09b2176 100644
--- a/src/win32/win32dep.c
+++ b/src/win32/win32dep.c
@@ -209,16 +209,4 @@ et_w32_truncate (const gchar *path, off_t length)
return ret;
}
-gint
-et_w32_ftruncate (gint fd, off_t length)
-{
- HANDLE h;
-
- h = (HANDLE)_get_osfhandle (fd);
-
- if (h == (HANDLE) - 1) return -1;
-
- return chsize ((gint)h, length);
-}
-
#endif /* G_OS_WIN32 */
diff --git a/src/win32/win32dep.h b/src/win32/win32dep.h
index 59cf681..eeac9a3 100644
--- a/src/win32/win32dep.h
+++ b/src/win32/win32dep.h
@@ -66,11 +66,6 @@ extern void ET_Win32_Path_Replace_Slashes (gchar *path);
extern gint et_w32_mkstemp (char *template);
#endif /* HAVE_MKSTEMP */
-#ifndef HAVE_FTRUNCATE
-#define et_w32_ftruncate ftruncate
-extern gint et_w32_ftruncate (gint fd, off_t length);
-#endif /* !HAVE_FTRUNCATE */
-
#ifndef HAVE_TRUNCATE
#define et_w32_truncate truncate
extern gint et_w32_truncate (const gchar *path, off_t length);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]