/usr/include/ptlib/wince/stdlibx.h is in libpt-1.10.10-dev 1.10.10-3.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | //
// (c) 2000 Yuri Kiryanov, openh323@kiryanov.com
// and Yuriy Gorvitovskiy
//
// Windows CE port of OpenH323 Open Source Project, www.openh323.org
// PWLib extras
#ifndef __STDLIBX_H__
#define __STDLIBX_H__
#include <stdlib.h>
#ifdef __cplusplus
#include <winsock.h>
#include <errno.h>
#include <tchar.h>
#include <wceatl.h>
#include <atlconv.h>
#include <winnetwk.h>
#include <mmsystemx.h>
#define assert(e)
extern "C"{
void __cdecl abort(void);
void __cdecl perror(const char *s);
};
#define _environ (NULL)
inline char *getenv( const char *varname ) { return NULL; };
inline int putenv( const char *envstring ) { return -1; };
#if _WIN32_WCE < 300
inline void* calloc(size_t num, size_t size)
{
void *ptr = malloc(num*size);
if(ptr)
memset(ptr, 0, num*size);
return ptr;
}
inline int isprint(int c) { return _istprint(c);}
inline int isxdigit(int c) { return _istxdigit(c); }
inline int isspace( int c ) { return _istspace(c); }
inline int isupper( int c ) { return _istupper(c); }
inline int islower( int c ) { return _istlower(c); }
inline int isalnum( int c ) { return _istalnum(c); }
inline int isalpha( int c ) { return _istalpha(c); }
inline int iscntrl( int c ) { return _istcntrl(c); }
inline int isdigit( int c ) { return _istdigit(c); }
inline int ispunct( int c ) { return _istpunct(c); }
#endif
int _mkdir(const char *);
int _rmdir(const char *);
int _access(const char *, int);
inline int access(const char * s, int i) { return _access(s,i); }
inline int _chdrive(int d) { return 0; }
inline int _chdir(const char * s) { return 0; }
char * _mktemp (char *temp);
int remove(const char *);
int _chmod( const char *filename, int pmode );
int rename( const char *oldname, const char *newname );
#define _S_IREAD 0000400 /* read permission, owner */
#define _S_IWRITE 0000200 /* write permission, owner */
#define S_IREAD _S_IREAD
#define S_IWRITE _S_IWRITE
#define _O_RDONLY 0x0000 /* open for reading only */
#define _O_WRONLY 0x0001 /* open for writing only */
#define _O_RDWR 0x0002 /* open for reading and writing */
#define _O_APPEND 0x0008 /* writes done at eof */
#define _O_CREAT 0x0100 /* create and open file */
#define _O_TRUNC 0x0200 /* open and truncate */
#define _O_EXCL 0x0400 /* open only if file doesn't already exist */
/* O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
** and <lf> sequences translated to <cr><lf> on write()'s
*/
#define _O_TEXT 0x4000 /* file mode is text (translated) */
#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */
/* macro to translate the C 2.0 name used to force binary mode for files */
#define _O_RAW _O_BINARY
/* Open handle inherit bit */
#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */
/* Temporary file bit - file is deleted when last handle is closed */
#define _O_TEMPORARY 0x0040 /* temporary file bit */
/* temporary access hint */
#define _O_SHORT_LIVED 0x1000 /* temporary storage file, try not to flush */
/* sequential/random access hints */
#define _O_SEQUENTIAL 0x0020 /* file access is primarily sequential */
#define _O_RANDOM 0x0010 /* file access is primarily random */
#define O_RDONLY _O_RDONLY
#define O_WRONLY _O_WRONLY
#define O_RDWR _O_RDWR
#define O_APPEND _O_APPEND
#define O_CREAT _O_CREAT
#define O_TRUNC _O_TRUNC
#define O_EXCL _O_EXCL
#define O_TEXT _O_TEXT
#define O_BINARY _O_BINARY
#define O_RAW _O_BINARY
#define O_TEMPORARY _O_TEMPORARY
#define O_NOINHERIT _O_NOINHERIT
#define O_SEQUENTIAL _O_SEQUENTIAL
#define O_RANDOM _O_RANDOM
#define _SH_DENYRW 0x10 /* deny read/write mode */
#define _SH_DENYWR 0x20 /* deny write mode */
#define _SH_DENYRD 0x30 /* deny read mode */
#define _SH_DENYNO 0x40 /* deny none mode */
long _lseek(int, long, int);
int _close(int);
int _read(int, void *, unsigned int);
int _write(int, const void *, unsigned int);
int _open( const char *filename, int oflag , int pmode );
int _chsize( int handle, long size );
int _sopen(const char *, int, int, ...);
#if _WIN32_WCE < 300
long strtol( const char *nptr, char **endptr, int base );
unsigned long strtoul( const char *nptr, char **endptr, int base );
double strtod( const char *nptr, char **endptr );
#endif
char * _i64toa (__int64 val,char *buf,int radix);
char * _ui64toa (unsigned __int64 val,char *buf,int radix);
#ifndef _X86_
__int64 _atoi64(const char *nptr);
#endif
#if _WIN32_WCE < 300
const char * strrchr(const char *, int);
size_t strspn( const char *string, const char *strCharSet );
#endif
int stricmp( const unsigned short*string1, const char* string2 );
int stricmp( const char*string1, const char* string2 );
int strcasecmp( const unsigned short*string1, const char* string2 );
int strcasecmp( const char*string1, const char* string2 );
int strncasecmp( const unsigned short*string1, const char* string2, int n );
int strncasecmp( const char*string1, const char* string2, int n );
LONG RegOpenKeyEx( HKEY hKey, const char* lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult );
LONG RegCreateKeyEx( HKEY hKey, const char* lpSub, DWORD dwr, LPSTR lpcls, DWORD dwo,
REGSAM sam, LPSECURITY_ATTRIBUTES lpsa, PHKEY phk, LPDWORD lpdw );
LONG RegEnumKey(HKEY hKey, DWORD dwIndex, LPTSTR lpName, DWORD cbName);
LONG RegDeleteKey( HKEY hKey, const char* lpSubKey );
LONG RegEnumValueCe( HKEY hKey, DWORD dwIndex, LPTSTR lpValueName, LPDWORD lpcbValueName,
LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData );
LONG RegQueryValueEx( HKEY hKey, char* lpValueName,
LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData );
LONG RegSetValueEx( HKEY hKey, const char* lpValueName, DWORD Reserved, DWORD dwType,
const BYTE *lpData, DWORD cbData );
LONG RegDeleteValue( HKEY hKey, const char* lpValueName );
UINT GetWindowsDirectory( char* lpBuffer, UINT uSize );
DWORD GetPrivateProfileString( const char* lpAppName, const char* lpKeyName,
const char* lpDefault, char* lpReturned, DWORD nSize, const char* );
BOOL WritePrivateProfileString(const char* lpAppName, const char* lpKeyName,
const char* lpString, const char* );
#endif // __cplusplus
#ifndef ECONNRESET
#define ECONNRESET WSAECONNRESET
#endif
#ifndef ECONNREFUSED
#define ECONNREFUSED WSAECONNREFUSED
#endif
#ifndef ENETUNREACH
#define ENETUNREACH WSAENETUNREACH
#endif
#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
#endif
#ifndef EADDRINUSE
#define EADDRINUSE WSAEADDRINUSE
#endif
#ifndef EADDRNOTAVAIL
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
#endif
#endif
|