mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
drop QT_NO_USE_FSEEKO configuration option [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0235b951c6
commit
e8ee7a33b6
1 changed files with 27 additions and 47 deletions
|
@ -22,9 +22,6 @@
|
|||
#ifndef QPLATFORMDEFS_H
|
||||
#define QPLATFORMDEFS_H
|
||||
|
||||
// Get defines/settings
|
||||
#include "qconfig.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <dirent.h>
|
||||
|
@ -34,10 +31,30 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define QT_STATBUF struct stat
|
||||
#define QT_FPOS_T fpos_t
|
||||
#define QT_OFF_T long
|
||||
// Definitions
|
||||
#define QT_STAT_MASK S_IFMT
|
||||
#define QT_STAT_REG S_IFREG
|
||||
#define QT_STAT_DIR S_IFDIR
|
||||
#define QT_STAT_LNK S_IFLNK
|
||||
#define QT_OPEN_RDONLY O_RDONLY
|
||||
#define QT_OPEN_WRONLY O_WRONLY
|
||||
#define QT_OPEN_RDWR O_RDWR
|
||||
#define QT_OPEN_CREAT O_CREAT
|
||||
#define QT_OPEN_TRUNC O_TRUNC
|
||||
#define QT_OPEN_APPEND O_APPEND
|
||||
#define QT_BUFFSIZE BUFSIZ
|
||||
|
||||
// Types
|
||||
#define QT_FPOS_T fpos_t
|
||||
#define QT_OFF_T off_t
|
||||
#define QT_SOCKLEN_T socklen_t
|
||||
|
||||
// Structures
|
||||
#define QT_STATBUF struct stat
|
||||
#define QT_DIR DIR
|
||||
#define QT_DIRENT struct dirent
|
||||
|
||||
// Functions (could be defined as macros)
|
||||
#define QT_STAT ::stat
|
||||
#define QT_LSTAT ::lstat
|
||||
#define QT_FSTAT ::fstat
|
||||
|
@ -46,34 +63,14 @@
|
|||
#define QT_LSEEK ::lseek
|
||||
#define QT_TRUNCATE ::truncate
|
||||
#define QT_FOPEN ::fopen
|
||||
#define QT_FSEEK ::fseek
|
||||
#define QT_FTELL ::ftell
|
||||
#define QT_FSEEK ::fseeko
|
||||
#define QT_FTELL ::ftello
|
||||
#define QT_FGETPOS ::fgetpos
|
||||
#define QT_FSETPOS ::fsetpos
|
||||
#define QT_FTRUNCATE ::ftruncate
|
||||
#define QT_MMAP ::mmap
|
||||
|
||||
#define QT_DIRENT struct dirent
|
||||
#define QT_READDIR ::readdir
|
||||
#define QT_READDIR_R ::readdir_r
|
||||
|
||||
// Posix extensions to C89
|
||||
#if !defined(QT_NO_USE_FSEEKO)
|
||||
#undef QT_OFF_T
|
||||
#undef QT_FSEEK
|
||||
#undef QT_FTELL
|
||||
|
||||
#define QT_OFF_T off_t
|
||||
|
||||
#define QT_FSEEK ::fseeko
|
||||
#define QT_FTELL ::ftello
|
||||
#endif
|
||||
|
||||
#define QT_STAT_MASK S_IFMT
|
||||
#define QT_STAT_REG S_IFREG
|
||||
#define QT_STAT_DIR S_IFDIR
|
||||
#define QT_STAT_LNK S_IFLNK
|
||||
|
||||
#define QT_ACCESS ::access
|
||||
#define QT_GETCWD ::getcwd
|
||||
#define QT_CHDIR ::chdir
|
||||
|
@ -82,27 +79,10 @@
|
|||
#define QT_CLOSE ::close
|
||||
#define QT_READ ::read
|
||||
#define QT_WRITE ::write
|
||||
|
||||
#define QT_OPEN_RDONLY O_RDONLY
|
||||
#define QT_OPEN_WRONLY O_WRONLY
|
||||
#define QT_OPEN_RDWR O_RDWR
|
||||
#define QT_OPEN_CREAT O_CREAT
|
||||
#define QT_OPEN_TRUNC O_TRUNC
|
||||
#define QT_OPEN_APPEND O_APPEND
|
||||
|
||||
// Posix extensions to C89
|
||||
#define QT_FILENO fileno // defined as macro on OpenBSD
|
||||
|
||||
#define QT_DIR DIR
|
||||
|
||||
#define QT_OPENDIR ::opendir
|
||||
#define QT_CLOSEDIR ::closedir
|
||||
|
||||
#define QT_SOCKLEN_T socklen_t
|
||||
|
||||
#define QT_FILENO fileno // defined as macro on OpenBSD
|
||||
#define QT_SOCKET_CONNECT ::connect
|
||||
#define QT_SOCKET_BIND ::bind
|
||||
|
||||
#define QT_BUFFSIZE BUFSIZ
|
||||
|
||||
#endif // include guard
|
||||
#endif // QPLATFORMDEFS_H
|
||||
|
|
Loading…
Add table
Reference in a new issue