📄 osheaders.h
字号:
#ifndef OSHeaders_H#define OSHeaders_H#include <limits.h>#include "PlatformHeader.h"#ifndef TRUE #define TRUE 1#endif#ifndef FALSE #define FALSE 0#endif/* Platform-specific components */#if __linux__ //for Linux Platform#define kInt16_Max SHRT_MAX#define kUInt16_Max USHRT_MAX#define kInt32_Max LONG_MAX#define kUInt32_Max ULONG_MAX#define kInt64_Max 0xFFFFFFFFFFFFFFFFLL#define kUInt64_Max 0xFFFFFFFFFFFFFFFFULL #define _64BITARG_ "q" /* paths */ #define kEOLString "\n" #define kPathDelimiterString "/" #define kPathDelimiterChar '/' #define kBadPathDelimiterStr "\\" #define kBadPathDelimiterChar '\\' #define kStdPathDelimiterStr "/"
#define kStdPathDelimiterChar '/'
#define kNotStdPathDelimiterStr "\\"
#define kNotStdPathDelimiterChar '\\'
#define kPartialPathBeginsWithDelimiter 0 /* Includes */ #include <sys/types.h> #include <netinet/in.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> /* Constants */ #define QT_TIME_TO_LOCAL_TIME (-2082844800) #define QT_PATH_SEPARATOR '/' /* Typedefs */ typedef unsigned int PointerSizedInt; typedef unsigned char UInt8; typedef unsigned char UChar; typedef signed char Int8; typedef char Char; typedef unsigned short UInt16; typedef signed short Int16; typedef unsigned long UInt32; typedef signed long Int32; typedef signed long long Int64; typedef unsigned long long UInt64; typedef float Float32; typedef double Float64; typedef UInt32 Bool; typedef unsigned long FourCharCode; typedef FourCharCode OSType; typedef pthread_t THREAD_ID; typedef pid_t PID; #ifdef FOUR_CHARS_TO_INT #error Conflicting Macro "FOUR_CHARS_TO_INT" #endif #define FOUR_CHARS_TO_INT( c1, c2, c3, c4 ) ( c1 << 24 | c2 << 16 | c3 << 8 | c4 ) #define FOUR_CHARS_TO_INT2( s ) ( s[3] << 24 | s[2] << 16 | s[1] << 8 | s[0] ) #ifdef TW0_CHARS_TO_INT #error Conflicting Macro "TW0_CHARS_TO_INT" #endif #define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 ) //Linux platform #define BIGENDIAN 0 #define kPlatformNameString "Linux" #define EXPORT#elif __Win32__ //for Windows Platform#define kInt16_Max SHRT_MAX#define kUInt16_Max USHRT_MAX#define kInt32_Max LONG_MAX#define kUInt32_Max ULONG_MAX#define kInt64_Max _I64_MAX#define kUInt64_Max (_UI64_MAX) /* Defines */ #define _64BITARG_ "I64" /* paths */ #define kEOLString "\r\n" #define kPathDelimiterString "\\" #define kPathDelimiterChar '\\' #define kBadPathDelimiterStr "/" #define kBadPathDelimiterChar '/'
#define kStdPathDelimiterStr "/"
#define kStdPathDelimiterChar '/'
#define kNotStdPathDelimiterStr "\\"
#define kNotStdPathDelimiterChar '\\'
#define kPartialPathBeginsWithDelimiter 0 #define crypt(buf, salt) ((char*)buf) /* Includes */#ifndef __VC7__ #include <windows.h>#endif #include <winsock2.h> #include <mswsock.h> #include <process.h> #include <ws2tcpip.h> #include <io.h> #include <direct.h> #include <errno.h> #define R_OK 0 #define W_OK 1 // POSIX errorcodes #define ENOTCONN 1002 #define ECONNRESET 1003 #define EADDRINUSE 1004 #define EINPROGRESS 1007 #define ENOBUFS 1008 #define EADDRNOTAVAIL 1009 // Winsock does not use iovecs struct iovec { u_long iov_len; // this is not the POSIX definition, it is rather defined to be char FAR* iov_base; // equivalent to a WSABUF for easy integration into Win32 }; /* Constants */ #define QT_TIME_TO_LOCAL_TIME (-2082844800) #define QT_PATH_SEPARATOR '/' /* Typedefs */ typedef unsigned int PointerSizedInt; typedef unsigned char UInt8; typedef unsigned char UChar; typedef signed char Int8; typedef char Char; typedef unsigned short UInt16; typedef signed short Int16; typedef unsigned long UInt32; typedef signed long Int32; typedef LONGLONG Int64; typedef ULONGLONG UInt64; typedef float Float32; typedef double Float64; typedef UInt32 Bool; typedef unsigned long FourCharCode; typedef FourCharCode OSType; typedef HANDLE THREAD_ID; #ifdef FOUR_CHARS_TO_INT #error Conflicting Macro "FOUR_CHARS_TO_INT" #endif #define FOUR_CHARS_TO_INT( c1, c2, c3, c4 ) ( c1 << 24 | c2 << 16 | c3 << 8 | c4 ) #define FOUR_CHARS_TO_INT2( s ) ( s[3] << 24 | s[2] << 16 | s[1] << 8 | s[0] ) #ifdef TW0_CHARS_TO_INT #error Conflicting Macro "TW0_CHARS_TO_INT" #endif #define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 ) #define kPlatformNameString "Win32" #define EXPORT __declspec(dllexport) #ifndef USE_DEFAULT_STD_LIB #define USE_DEFAULT_STD_LIB 1 #endif#endiftypedef Int32 OS_Error;enum{ OS_NoErr = (OS_Error) 0, OS_Err = (OS_Error) -1, OS_BadURLFormat = (OS_Error) -100, OS_NotEnoughSpace = (OS_Error) -101};// use no http/rtsp tspecial chars in kVersionString and kBuildString defines#define kVersionString "1.0"#define kBuildString "1.0"#define kCommentString "Release/Panther; Update/3GPP; "
extern Bool g_LockServer;#endif /* OSHeaders_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -