Changeset 46033 in vbox
- Timestamp:
- May 13, 2013 4:28:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cdefs.h
r46024 r46033 331 331 * @endcode 332 332 */ 333 334 /* 335 * Set RT_OPSYS_XXX according to RT_OS_XXX. 336 * 337 * Search: #define RT_OPSYS_([A-Z0-9]+) .* 338 * Replace: # elif defined(RT_OS_\1)\n# define RT_OPSYS RT_OPSYS_\1 339 */ 333 340 #ifndef RT_OPSYS 334 # if defined(__APPLE__) || defined(RT_OS_DARWIN) 341 # if defined(RT_OS_UNKNOWN) 342 # define RT_OPSYS RT_OPSYS_UNKNOWN 343 # elif defined(RT_OS_AGNOSTIC) 344 # define RT_OPSYS RT_OPSYS_AGNOSTIC 345 # elif defined(RT_OS_DARWIN) 346 # define RT_OPSYS RT_OPSYS_DARWIN 347 # elif defined(RT_OS_DRAGONFLY) 348 # define RT_OPSYS RT_OPSYS_DRAGONFLY 349 # elif defined(RT_OS_DOS) 350 # define RT_OPSYS RT_OPSYS_DOS 351 # elif defined(RT_OS_FREEBSD) 352 # define RT_OPSYS RT_OPSYS_FREEBSD 353 # elif defined(RT_OS_HAIKU) 354 # define RT_OPSYS RT_OPSYS_HAIKU 355 # elif defined(RT_OS_LINUX) 356 # define RT_OPSYS RT_OPSYS_LINUX 357 # elif defined(RT_OS_L4) 358 # define RT_OPSYS RT_OPSYS_L4 359 # elif defined(RT_OS_MINIX) 360 # define RT_OPSYS RT_OPSYS_MINIX 361 # elif defined(RT_OS_NETBSD) 362 # define RT_OPSYS RT_OPSYS_NETBSD 363 # elif defined(RT_OS_NETWARE) 364 # define RT_OPSYS RT_OPSYS_NETWARE 365 # elif defined(RT_OS_NT) 366 # define RT_OPSYS RT_OPSYS_NT 367 # elif defined(RT_OS_OPENBSD) 368 # define RT_OPSYS RT_OPSYS_OPENBSD 369 # elif defined(RT_OS_OS2) 370 # define RT_OPSYS RT_OPSYS_OS2 371 # elif defined(RT_OS_PLAN9) 372 # define RT_OPSYS RT_OPSYS_PLAN9 373 # elif defined(RT_OS_QNX) 374 # define RT_OPSYS RT_OPSYS_QNX 375 # elif defined(RT_OS_SOLARIS) 376 # define RT_OPSYS RT_OPSYS_SOLARIS 377 # elif defined(RT_OS_UEFI) 378 # define RT_OPSYS RT_OPSYS_UEFI 379 # elif defined(RT_OS_WINDOWS) 380 # define RT_OPSYS RT_OPSYS_WINDOWS 381 # endif 382 #endif 383 384 /* 385 * Guess RT_OPSYS based on compiler predefined macros. 386 */ 387 #ifndef RT_OPSYS 388 # if defined(__APPLE__) 335 389 # define RT_OPSYS RT_OPSYS_DARWIN 336 # elif defined(__DragonFly__) || defined(RT_OS_DRAGONFLY)390 # elif defined(__DragonFly__) 337 391 # define RT_OPSYS RT_OPSYS_DRAGONFLY 338 # elif defined(__FreeBSD__) /*??*/ || defined(RT_OS_FREEBSD)392 # elif defined(__FreeBSD__) /*??*/ 339 393 # define RT_OPSYS RT_OPSYS_FREEBSD 340 # elif defined(__gnu_linux__) || defined(RT_OS_LINUX)394 # elif defined(__gnu_linux__) 341 395 # define RT_OPSYS RT_OPSYS_LINUX 342 # elif defined(__NetBSD__) /*??*/ || defined(RT_OS_NETBSD)396 # elif defined(__NetBSD__) /*??*/ 343 397 # define RT_OPSYS RT_OPSYS_NETBSD 344 # elif defined(__OpenBSD__) /*??*/ || defined(RT_OS_OPENBSD)398 # elif defined(__OpenBSD__) /*??*/ 345 399 # define RT_OPSYS RT_OPSYS_OPENBSD 346 # elif defined(__OS2__) || defined(RT_OS_OS2)400 # elif defined(__OS2__) 347 401 # define RT_OPSYS RT_OPSYS_OS2 348 # elif defined(__sun__) || defined(__SunOS__) || defined(__sun) || defined(__SunOS) || defined(RT_OS_SOLARIS)402 # elif defined(__sun__) || defined(__SunOS__) || defined(__sun) || defined(__SunOS) 349 403 # define RT_OPSYS RT_OPSYS_SOLARIS 350 # elif defined(_WIN32) || defined(_WIN64) || defined(RT_OS_WINDOWS)404 # elif defined(_WIN32) || defined(_WIN64) 351 405 # define RT_OPSYS RT_OPSYS_WINDOWS 352 406 # else … … 354 408 # endif 355 409 #endif 410 356 411 #if RT_OPSYS < RT_OPSYS_UNKNOWN || RT_OPSYS >= RT_OPSYS_MAX 357 412 # error "Invalid RT_OPSYS value."
Note:
See TracChangeset
for help on using the changeset viewer.