Changeset 43363 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Sep 20, 2012 9:56:07 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 80827
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 21 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/VBox/log-vbox.cpp
r40938 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 138 138 # include <stdlib.h> 139 139 # include <unistd.h> 140 # elif defined(RT_OS_HAIKU) 141 # include <OS.h> 140 142 # elif defined(RT_OS_SOLARIS) 141 143 # define _STRUCTURED_PROC 1 … … 369 371 } 370 372 373 # elif defined(RT_OS_HAIKU) 374 team_info info; 375 if (get_team_info(0, &info) == B_OK) 376 { 377 /* there is an info.argc, but no way to know arg boundaries */ 378 RTLogLoggerEx(pLogger, 0, ~0U, "Commandline: %.64s\n", info.args); 379 } 380 371 381 # elif defined(RT_OS_FREEBSD) 372 382 /* Retrieve the required length first */ -
trunk/src/VBox/Runtime/common/err/RTErrConvertFromErrno.cpp
r40824 r43363 431 431 #endif 432 432 #ifdef EDOOFUS 433 # if EDOOFUS != EINVAL 433 434 case EDOOFUS: return VERR_INTERNAL_ERROR; 435 # endif 434 436 #endif 435 437 #ifdef ENOTSUP -
trunk/src/VBox/Runtime/r3/posix/RTHandleGetStandard-posix.cpp
r33973 r43363 5 5 6 6 /* 7 * Copyright (C) 201 0Oracle Corporation7 * Copyright (C) 2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 #include <sys/types.h> 34 34 #include <sys/ioctl.h> 35 #include <sys/fcntl.h>36 35 #include <fcntl.h> 37 36 #ifdef _MSC_VER -
trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
r39627 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 #include <sys/types.h> 35 35 #include <sys/stat.h> 36 #include <sys/fcntl.h>37 36 #include <fcntl.h> 38 37 #include <dirent.h> … … 54 53 #include "internal/path.h" 55 54 56 #if !defined(RT_OS_SOLARIS) 55 #if !defined(RT_OS_SOLARIS) && !defined(RT_OS_HAIKU) 57 56 # define HAVE_DIRENT_D_TYPE 1 58 57 #endif -
trunk/src/VBox/Runtime/r3/posix/fileio-posix.cpp
r39627 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 35 35 #include <sys/types.h> 36 36 #include <sys/ioctl.h> 37 #include <sys/fcntl.h>38 37 #include <fcntl.h> 39 38 #ifdef _MSC_VER -
trunk/src/VBox/Runtime/r3/posix/fileio2-posix.cpp
r40553 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 57 57 #endif 58 58 59 #ifdef RT_OS_HAIKU 60 # define USE_FUTIMENS 61 #endif 62 59 63 #include <iprt/file.h> 60 64 #include <iprt/path.h> … … 144 148 return VINF_SUCCESS; 145 149 150 #ifdef USE_FUTIMENS 151 struct timespec aTimespecs[2]; 152 if (pAccessTime && pModificationTime) 153 { 154 memcpy(&aTimespecs[0], pAccessTime, sizeof(struct timespec)); 155 memcpy(&aTimespecs[1], pModificationTime, sizeof(struct timespec)); 156 } 157 else 158 { 159 RTFSOBJINFO ObjInfo; 160 int rc = RTFileQueryInfo(hFile, &ObjInfo, RTFSOBJATTRADD_UNIX); 161 if (RT_FAILURE(rc)) 162 return rc; 163 memcpy(&aTimespecs[0], pAccessTime ? pAccessTime : &ObjInfo.AccessTime, sizeof(struct timespec)); 164 memcpy(&aTimespecs[1], pModificationTime ? pModificationTime : &ObjInfo.ModificationTime, sizeof(struct timespec)); 165 } 166 167 if (futimens(RTFileToNative(hFile), aTimespecs)) 168 { 169 int rc = RTErrConvertFromErrno(errno); 170 Log(("RTFileSetTimes(%RTfile,%p,%p,,): returns %Rrc\n", hFile, pAccessTime, pModificationTime, rc)); 171 return rc; 172 } 173 #else 146 174 /* 147 175 * Convert the input to timeval, getting the missing one if necessary, … … 172 200 return rc; 173 201 } 202 #endif 174 203 return VINF_SUCCESS; 175 204 } -
trunk/src/VBox/Runtime/r3/posix/filelock-posix.cpp
r37596 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 #include <sys/types.h> 35 35 #include <sys/ioctl.h> 36 #include <sys/fcntl.h>37 36 #include <fcntl.h> 38 37 #include <unistd.h> -
trunk/src/VBox/Runtime/r3/posix/fs2-posix.cpp
r34015 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 34 34 #ifndef DEV_BSIZE 35 35 # include <sys/stat.h> 36 # if defined(RT_OS_HAIKU) && !defined(S_BLKSIZE) 37 # define S_BLKSIZE 512 38 # endif 36 39 # define DEV_BSIZE S_BLKSIZE /** @todo bird: add DEV_BSIZE to sys/param.h on OS/2. */ 37 40 #endif -
trunk/src/VBox/Runtime/r3/posix/rand-posix.cpp
r37596 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 33 33 #include <sys/types.h> 34 34 #include <sys/ioctl.h> 35 #include <sys/fcntl.h>36 35 #include <fcntl.h> 37 36 #ifdef _MSC_VER -
trunk/src/VBox/Runtime/r3/posix/semevent-posix.cpp
r39032 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 49 49 #endif 50 50 51 #if def RT_OS_SOLARIS51 #if defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 52 52 # include <sched.h> 53 53 # define pthread_yield() sched_yield() … … 398 398 */ 399 399 struct timespec ts = {0,0}; 400 #if def RT_OS_DARWIN400 #if defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU) 401 401 struct timeval tv = {0,0}; 402 402 gettimeofday(&tv, NULL); -
trunk/src/VBox/Runtime/r3/posix/semeventmulti-posix.cpp
r40103 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 482 482 if (!pThis->fMonotonicClock) 483 483 { 484 #if def RT_OS_DARWIN484 #if defined(RT_OS_DARWIN) || defined(RT_OS_HAIKU) 485 485 struct timeval tv = {0,0}; 486 486 gettimeofday(&tv, NULL); -
trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp
r28800 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 250 250 */ 251 251 struct timespec ts = {0,0}; 252 #ifdef RT_OS_HAIKU 253 struct timeval tv = {0,0}; 254 gettimeofday(&tv, NULL); 255 ts.tv_sec = tv.tv_sec; 256 ts.tv_nsec = tv.tv_usec * 1000; 257 #else 252 258 clock_gettime(CLOCK_REALTIME, &ts); 259 #endif 253 260 if (cMillies != 0) 254 261 { -
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r41881 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 52 52 # define IPRT_MAY_HAVE_PTHREAD_SET_NAME_NP 53 53 # include <dlfcn.h> 54 #endif 55 #if defined(RT_OS_HAIKU) 56 # include <OS.h> 54 57 #endif 55 58 … … 413 416 414 417 return VINF_SUCCESS; 418 #elif defined(RT_OS_HAIKU) 419 thread_info ThreadInfo; 420 status_t status = get_thread_info(find_thread(NULL), &ThreadInfo); 421 AssertReturn(status == B_OK, RTErrConvertFromErrno(status)); 422 423 *pKernelTime = ThreadInfo.kernel_time / 1000; 424 *pUserTime = ThreadInfo.user_time / 1000; 425 426 return VINF_SUCCESS; 415 427 #else 416 428 return VERR_NOT_IMPLEMENTED; -
trunk/src/VBox/Runtime/r3/posix/thread2-posix.cpp
r39443 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 63 63 #elif defined(RT_OS_FREEBSD) /* void pthread_yield */ 64 64 pthread_yield(); 65 #elif defined(RT_OS_SOLARIS) 65 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 66 66 sched_yield(); 67 67 #else … … 102 102 #elif defined(RT_OS_FREEBSD) /* void pthread_yield */ 103 103 pthread_yield(); 104 #elif defined(RT_OS_SOLARIS) 104 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 105 105 sched_yield(); 106 106 #else … … 131 131 #ifdef RT_OS_DARWIN 132 132 pthread_yield_np(); 133 #elif defined(RT_OS_SOLARIS) 133 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) 134 134 sched_yield(); 135 135 #else -
trunk/src/VBox/Runtime/r3/posix/utf8-posix.cpp
r40654 r43363 5 5 6 6 /* 7 * Copyright (C) 2006-201 0Oracle Corporation7 * Copyright (C) 2006-2012 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 194 194 const void *pvInputLeft = pvInput; 195 195 void *pvOutputLeft = pvOutput; 196 #if defined(RT_OS_LINUX) || defined(RT_OS_ SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */196 #if defined(RT_OS_LINUX) || defined(RT_OS_HAIKU) || defined(RT_OS_SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */ 197 197 if (iconv(hIconv, (char **)&pvInputLeft, &cbInLeft, (char **)&pvOutputLeft, &cbOutLeft) != (size_t)-1) 198 198 #else … … 320 320 const void *pvInputLeft = pvInput; 321 321 void *pvOutputLeft = pvOutput; 322 #if defined(RT_OS_LINUX) || defined(RT_OS_ SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */322 #if defined(RT_OS_LINUX) || defined(RT_OS_HAIKU) || defined(RT_OS_SOLARIS) || (defined(RT_OS_DARWIN) && defined(_DARWIN_FEATURE_UNIX_CONFORMANCE)) /* there are different opinions about the constness of the input buffer. */ 323 323 if (iconv(icHandle, (char **)&pvInputLeft, &cbInLeft, (char **)&pvOutputLeft, &cbOutLeft) != (size_t)-1) 324 324 #else -
trunk/src/VBox/Runtime/r3/socket.cpp
r43213 r43363 34 34 #else /* !RT_OS_WINDOWS */ 35 35 # include <errno.h> 36 # include <sys/select.h> 36 37 # include <sys/stat.h> 37 38 # include <sys/socket.h>
Note:
See TracChangeset
for help on using the changeset viewer.