Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
michael@0 | 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef prpcos_h___ |
michael@0 | 7 | #define prpcos_h___ |
michael@0 | 8 | |
michael@0 | 9 | #define PR_DLL_SUFFIX ".dll" |
michael@0 | 10 | |
michael@0 | 11 | #include <stdlib.h> |
michael@0 | 12 | |
michael@0 | 13 | #define DIRECTORY_SEPARATOR '\\' |
michael@0 | 14 | #define DIRECTORY_SEPARATOR_STR "\\" |
michael@0 | 15 | #define PATH_SEPARATOR ';' |
michael@0 | 16 | |
michael@0 | 17 | /* |
michael@0 | 18 | ** Routines for processing command line arguments |
michael@0 | 19 | */ |
michael@0 | 20 | PR_BEGIN_EXTERN_C |
michael@0 | 21 | #ifndef XP_OS2 |
michael@0 | 22 | extern char *optarg; |
michael@0 | 23 | extern int optind; |
michael@0 | 24 | extern int getopt(int argc, char **argv, char *spec); |
michael@0 | 25 | #endif |
michael@0 | 26 | PR_END_EXTERN_C |
michael@0 | 27 | |
michael@0 | 28 | |
michael@0 | 29 | /* |
michael@0 | 30 | ** Definitions of directory structures amd functions |
michael@0 | 31 | ** These definitions are from: |
michael@0 | 32 | ** <dirent.h> |
michael@0 | 33 | */ |
michael@0 | 34 | #ifdef XP_OS2 |
michael@0 | 35 | #include <sys/types.h> |
michael@0 | 36 | #endif |
michael@0 | 37 | #include <sys/stat.h> |
michael@0 | 38 | #include <io.h> |
michael@0 | 39 | #include <fcntl.h> /* O_BINARY */ |
michael@0 | 40 | |
michael@0 | 41 | #ifdef OS2 |
michael@0 | 42 | extern PRStatus _MD_OS2GetHostName(char *name, PRUint32 namelen); |
michael@0 | 43 | #define _MD_GETHOSTNAME _MD_OS2GetHostName |
michael@0 | 44 | #else |
michael@0 | 45 | extern PRStatus _MD_WindowsGetHostName(char *name, PRUint32 namelen); |
michael@0 | 46 | #define _MD_GETHOSTNAME _MD_WindowsGetHostName |
michael@0 | 47 | extern PRStatus _MD_WindowsGetSysInfo(PRSysInfo cmd, char *name, PRUint32 namelen); |
michael@0 | 48 | #define _MD_GETSYSINFO _MD_WindowsGetSysInfo |
michael@0 | 49 | #endif |
michael@0 | 50 | |
michael@0 | 51 | #endif /* prpcos_h___ */ |