"Fossies" - the Fresh Open Source Software Archive

Member "bonnie++-2.00a/port.h" (22 Sep 2020, 976 Bytes) of package /linux/privat/bonnie++-2.00a.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "port.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 1.97_vs_1.97.3.

    1 #ifndef PORT_UNIX_H
    2 #define PORT_UNIX_H
    3 
    4 #include "conf.h"
    5 
    6 
    7 
    8 
    9 #ifndef _LARGEFILE64_SOURCE
   10 #define _LARGEFILE64_SOURCE
   11 #endif
   12 #ifdef _LARGEFILE64_SOURCE
   13 #define OFF_T_PRINTF "%lld"
   14 #else
   15 #define OFF_T_PRINTF "%d"
   16 #endif
   17 
   18 #if 0
   19 #define false 0
   20 #define true 1
   21 #endif
   22 
   23 // UNIX here
   24 typedef struct timeval TIMEVAL_TYPE;
   25 
   26 #ifdef _LARGEFILE64_SOURCE
   27 #define OFF_TYPE off64_t
   28 #define file_lseek lseek64
   29 #define file_creat creat64
   30 #define file_open open64
   31 #else
   32 #define OFF_TYPE off_t
   33 #define file_lseek lseek
   34 #define file_creat creat
   35 #define file_open open
   36 #endif
   37 
   38 typedef int FILE_TYPE;
   39 typedef unsigned int UINT;
   40 typedef unsigned long ULONG;
   41 typedef const char * PCCHAR;
   42 typedef char * PCHAR;
   43 typedef PCHAR const CPCHAR;
   44 typedef PCCHAR const CPCCHAR;
   45 typedef void * PVOID;
   46 typedef PVOID const CPVOID;
   47 typedef const CPVOID CPCVOID;
   48 
   49 typedef FILE_TYPE *PFILE_TYPE;
   50 
   51 #define _strdup strdup
   52 
   53 #ifdef NO_SNPRINTF
   54 #define _snprintf sprintf
   55 #else
   56 #define _snprintf snprintf
   57 #endif
   58 
   59 #endif