kdecore Library API Documentation

kde_file.h

00001 /*
00002    This file is part of the KDE libraries
00003    Copyright (C) 2001 Waldo Bastian <bastian@kde.org>
00004    Copyright (C) 2004 Jaroslaw Staniek <js@iidea.pl>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef _KDE_FILE_H_
00022 #define _KDE_FILE_H_
00023 
00030 #include <unistd.h>
00031 #ifdef _WIN32
00032 #include <kde_file_win.h>
00033 #endif
00034  
00035 #if (defined _LFS64_LARGEFILE) && (defined _LARGEFILE64_SOURCE)
00036 
00053 #define KDE_stat        ::stat64
00054 #define KDE_lstat       ::lstat64
00055 #define KDE_fstat       ::fstat64
00056 #define KDE_open        ::open64
00057 #define KDE_lseek       ::lseek64
00058 #define KDE_fseek       ::fseek64
00059 #define KDE_ftell       ::ftell64
00060 #define KDE_fgetpos     ::fgetpos64
00061 #define KDE_fsetpos     ::fsetpos64
00062 #define KDE_readdir     ::readdir64
00063 #define KDE_sendfile    ::sendfile64
00064 #define KDE_struct_stat     struct stat64
00065 #define KDE_struct_dirent   struct dirent64
00066 /* TODO: define for win32 */
00067 
00068 #else /* !_LFS64_LARGEFILE */
00069 
00073 #ifdef _WIN32
00074 #define KDE_stat        kdewin32_stat
00075 #define KDE_lstat       kdewin32_lstat
00076 #define KDE_open        kdewin32_open
00077 #else /* unix */
00078 #define KDE_stat        ::stat
00079 #define KDE_lstat       ::lstat
00080 #define KDE_open        ::open
00081 #endif
00082 
00083 #define KDE_fstat       ::fstat
00084 #define KDE_lseek       ::lseek
00085 #define KDE_fseek       ::fseek
00086 #define KDE_ftell       ::ftell
00087 #define KDE_fgetpos     ::fgetpos
00088 #define KDE_fsetpos     ::fsetpos
00089 #define KDE_readdir     ::readdir
00090 #define KDE_sendfile    ::sendfile
00091 #define KDE_struct_stat     struct stat
00092 #define KDE_struct_dirent   struct dirent
00093 #endif
00094 
00095 
00096 #ifdef _LFS64_STDIO
00097 #define KDE_fopen       ::fopen64
00098 #define KDE_freopen ::freopen64
00099 /* TODO: define for win32 */
00100 #else
00101 #ifdef _WIN32
00102 #define KDE_fopen       kdewin32_fopen
00103 #define KDE_freopen kdewin32_freopen
00104 #else /* unix */
00105 #define KDE_fopen       ::fopen
00106 #endif
00107 #endif
00108 
00109 /* functions without 64-bit version but wrapped for compatibility reasons */
00110 #ifdef _WIN32
00111 #define KDE_fdopen  kdewin32_fdopen
00112 #else /* unix */
00113 #define KDE_fdopen  ::fdopen
00114 #endif
00115 
00116 #endif /* _KDE_FILE_H_ */
KDE Logo
This file is part of the documentation for kdecore Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Jul 22 10:16:17 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003