1 2 /***********************************************************************/ 3 /* Open Visualization Data Explorer */ 4 /* (C) Copyright IBM Corp. 1989,1999 */ 5 /* ALL RIGHTS RESERVED */ 6 /* This code licensed under the */ 7 /* "IBM PUBLIC LICENSE - Open Visualization Data Explorer" */ 8 /***********************************************************************/ 9 10 /* 11 * architecture dependent file. 12 */ 13 #ifndef _DXI_ARCH_H 14 #define _DXI_ARCH_H 1 15 16 #if HAVE_SYS_PARAM_H 17 #include <sys/param.h> 18 #endif 19 20 #if !defined(MIN) 21 #define MIN(a,b) ((a)<(b)?(a):(b)) 22 #endif 23 24 #if !defined(MAX) 25 #define MAX(a,b) ((a)>(b)?(a):(b)) 26 #endif 27 28 #if (HAS_S_ISDIR == 0) 29 #define S_ISDIR(x) ((x) & (S_IFDIR)) 30 #endif 31 32 #if (HAS_M_PI == 0) 33 #define M_PI 3.1415926535897931160E0 /*Hex 2^ 1 * 1.921FB54442D18 */ 34 #endif 35 36 #if (HAS_M_SQRT2 == 0) 37 #define M_SQRT2 1.4142135623730951455E0 /*Hex 2^ 0 * 1.6A09E667F3BCD */ 38 #endif 39 40 #if defined(HAVE_REGCMP) || defined(RE_COMP) 41 #undef DXD_LACKS_ANY_REGCMP 42 #else 43 #define DXD_LACKS_ANY_REGCMP 44 #endif 45 46 #ifdef HAS_SYS_TYPES_H 47 #include <sys/types.h> 48 #endif 49 50 #define DXD_IS_MP 1 51 52 #define DXD_EXEC_WAIT_PROCESS 1 53 54 #ifdef HAVE_SYSMP 55 #define DXD_HAS_SYSMP 1 56 #endif 57 58 #if defined(HAVE__PIPE) && !defined(HAVE_PIPE) 59 #define pipe(fds) _pipe(fds, 4096, O_BINARY) 60 #endif 61 62 #if defined(HAVE__ISATTY) && !defined(HAVE_ISATTY) 63 #define isatty _isatty 64 #endif 65 66 #if defined(HAVE__UNLINK) && !defined(HAVE_UNLINK) 67 #define unlink _unlink 68 #endif 69 70 #if defined(HAVE__POPEN) && !defined(HAVE_POPEN) 71 #define popen _popen 72 #endif 73 74 #if defined(HAVE__PCLOSE) && !defined(HAVE_PCLOSE) 75 #define pclose _pclose 76 #endif 77 78 #if defined(HAVE_STRICMP) && !defined(HAVE_STRCASECMP) 79 #define strcasecmp stricmp 80 #endif 81 82 #if !defined(HAVE_RAND_MAX) 83 #define RAND_MAX 0x7fffffff 84 #endif 85 86 #if defined(HAVE_RAND) && !defined(HAVE_RANDOM) 87 #define random rand 88 #undef RAND_MAX 89 #define RAND_MAX 0x7fff 90 #endif 91 92 #if defined(HAVE_SRAND) && !defined(HAVE_SRANDOM) 93 #define srandom srand 94 #endif 95 96 #if defined(HAVE__ALLOCA) && !defined(HAVE_ALLOCA) 97 #define alloca _alloca 98 #endif 99 100 /* defined if we want to get processor status window */ 101 #define DXD_PROCESSOR_STATUS 1 102 103 /* hardware rendering is an option? */ 104 #define DXD_CAN_HAVE_HW_RENDERING 1 105 106 /* supports full IEEE standard floating point, including under/overflow */ 107 #define DXD_STANDARD_IEEE 1 108 109 /* supports popen() */ 110 #ifdef HAVE_POPEN 111 #define DXD_POPEN_OK 1 112 #endif 113 114 /* do the printf-type routines return a pointer or a count? */ 115 #define DXD_PRINTF_RETURNS_COUNT 1 116 117 /* socket-specific ifdefs */ 118 #define DXD_SOCKET_UNIXDOMAIN_OK 1 119 #ifndef HAVE_SYS_UN_H 120 #undef DXD_SOCKET_UNIXDOMAIN_OK 121 #endif 122 #define DXD_HAS_GETDTABLESIZE 1 123 124 /* can you use rlimit to stop the exec from creating a huge core file? */ 125 #define DXD_HAS_RLIMIT 1 126 127 /* is hardware device coordinates orientation right-handed? */ 128 #define DXD_HW_DC_RIGHT_HANDED 1 129 130 /* is it sometimes necessary to check if a window has been destroyed? */ 131 #define DXD_HW_WINDOW_DESTRUCTION_CHECK 1 132 133 /* is GL texture mapping supported? */ 134 #define DXD_HW_TEXTURE_MAPPING 1 135 136 /* is special HW gamma compensation necessary? */ 137 #define DXD_HW_SPECIAL_GAMMA_COMPENSATION 1 138 139 /* API (eg. GL) keeps its own copy of the object */ 140 #define DXD_HW_API_DISPLAY_LIST_MEMORY 1 141 142 /* supports xwindows status display? */ 143 #define DXD_EXEC_STATUS_DISPLAY 1 144 145 #define DXD_HAS_UNIX_SYS_INCLUDES 1 146 147 #ifdef HAVE_UNISTD 148 #define DXD_HAS_UNISTD_H 1 149 #endif 150 151 /* default values for gamma correction */ 152 #define DXD_GAMMA_8BIT 2.0 153 #define DXD_GAMMA_12BIT 2.0 154 #define DXD_GAMMA_15BIT 2.0 155 #define DXD_GAMMA_16BIT 2.0 156 #define DXD_GAMMA_24BIT 2.0 157 #define DXD_GAMMA_32BIT 2.0 158 159 /* cannot load runtime-loadable modules after forking */ 160 #define DXD_NO_MP_RUNTIME 1 161 162 #define F_CHAR_READY(fp) ((fp)->_cnt > 0) 163 164 #define IOCTL ioctl 165 166 #if !defined(HAVE_STRRSTR) 167 #if defined(__cplusplus) || defined(c_plusplus) 168 extern "C" 169 #endif 170 char *strrstr(char *, char *); 171 #endif 172 173 #ifdef linux 174 175 #undef F_CHAR_READY 176 #define F_CHAR_READY(fp) ((fp)->_IO_read_ptr < (fp)->_IO_read_end) 177 178 #endif 179 180 /* 181 * FreeBSD (and probably NetBSD and OpenBSD) 182 */ 183 #if defined(freebsd) 184 185 #undef F_CHAR_READY 186 #define F_CHAR_READY(fp) ((fp)->_r > 0 || (fp)->_ub._base) 187 188 #endif 189 190 #ifdef cygwin 191 192 #ifdef ERROR_DATA_INVALID 193 #undef ERROR_DATA_INVALID 194 #endif 195 196 #define DXD_SYSERRLIST_DECL 1 197 198 #undef F_CHAR_READY 199 #define F_CHAR_READY(fp) ((fp)->_r > 0 || (fp)->_ub._base) 200 201 #endif 202 203 /* Macos X - typically on Apple hardware 204 */ 205 #ifdef macos 206 207 /* #define trunc(value) ((float)((int)(value))) - trunc now defined in OS 10.2 */ 208 209 /* default values for gamma correction */ 210 #undef DXD_GAMMA_8BIT 211 #undef DXD_GAMMA_12BIT 212 #undef DXD_GAMMA_15BIT 213 #undef DXD_GAMMA_16BIT 214 #undef DXD_GAMMA_24BIT 215 #undef DXD_GAMMA_32BIT 216 #define DXD_GAMMA_8BIT 1.0 217 #define DXD_GAMMA_12BIT 1.0 218 #define DXD_GAMMA_15BIT 1.0 219 #define DXD_GAMMA_16BIT 1.0 220 #define DXD_GAMMA_24BIT 1.0 221 #define DXD_GAMMA_32BIT 1.0 222 223 #endif /* macos */ 224 225 /* silicon graphics: indigo, crimson, 280/gtx, onyx, extreme 226 */ 227 #ifdef sgi 228 229 /* is it sometimes necessary to check if a window has been destroyed? */ 230 #define DXD_HW_WINDOW_DESTRUCTION_CHECK 1 231 232 /* is GL texture mapping supported? */ 233 #define DXD_HW_TEXTURE_MAPPING 1 234 235 /* is special HW gamma compensation necessary? */ 236 #define DXD_HW_SPECIAL_GAMMA_COMPENSATION 1 237 238 /* API (eg. GL) keeps its own copy of the object */ 239 #define DXD_HW_API_DISPLAY_LIST_MEMORY 1 240 241 /* default values for gamma correction */ 242 #undef DXD_GAMMA_8BIT 243 #undef DXD_GAMMA_12BIT 244 #undef DXD_GAMMA_15BIT 245 #undef DXD_GAMMA_16BIT 246 #undef DXD_GAMMA_24BIT 247 #undef DXD_GAMMA_32BIT 248 #define DXD_GAMMA_8BIT 1.0 249 #define DXD_GAMMA_12BIT 1.0 250 #define DXD_GAMMA_15BIT 1.0 251 #define DXD_GAMMA_16BIT 1.0 252 #define DXD_GAMMA_24BIT 2.0 253 #define DXD_GAMMA_32BIT 2.0 254 255 #endif /* sgi */ 256 257 258 /* hp/700-800 series 259 */ 260 #ifdef hp700 261 262 /* do you need to declare the system error list explicitly? */ 263 #define DXD_SYSERRLIST_DECL 1 264 #define DXD_PRINTF_RETURNS_COUNT 1 265 266 /* socket-specific ifdefs */ 267 #define DXD_SOCKET_UNIXDOMAIN_OK 1 268 #define DXD_HAS_GETHOSTBYNAME 1 269 270 /* compensate for bug in hardware window reparenting */ 271 #define DXD_HW_REPARENT_OFFSET_X -2 272 #define DXD_HW_REPARENT_OFFSET_Y -3 273 274 /* Does this hardware support alpha transparency per connection? position?*/ 275 #define DXD_HW_ALPHA_CNTNS 1 276 #define DXD_HW_ALPHA_POSNS 0 277 278 /* Does the X server behave correctly for a move of a Starbase window */ 279 #define DXD_HW_XSERVER_MOVE_OK 1 280 281 /* select expects int pointers for params */ 282 #define DXD_SELECTPTR_DEFINED 1 283 284 /* can use the crypt system call for data encryption */ 285 #define DXD_HAS_CRYPT 1 286 287 /* system includes are in /usr/include/sys and /usr/include/unistd.h exists */ 288 #define DXD_HAS_UNIX_SYS_INCLUDES 1 289 #define DXD_HAS_UNISTD_H 1 290 291 /* system includes support for the vfork() system call */ 292 #define DXD_HAS_VFORK 1 293 294 #endif /* hp700 */ 295 296 297 /* ibm risc system/6000 298 */ 299 #ifdef ibm6000 300 301 #include <sys/types.h> 302 303 /* license manager active in this version */ 304 #undef DXD_LICENSED_VERSION 305 306 /* supports full IEEE standard floating point, including under/overflow */ 307 #define DXD_STANDARD_IEEE 1 308 309 /* hardware rendering is an option? */ 310 #define DXD_CAN_HAVE_HW_RENDERING 1 311 312 /* defined if we support multiprocessor version */ 313 #define DXD_IS_MP 1 314 315 /* do we need to keep a parent wait-process around? */ 316 #define DXD_EXEC_WAIT_PROCESS 1 317 318 /* does this system support _system_configuration.ncpus */ 319 #define DXD_HAS_SYSCONFIG 1 320 321 /* supports popen() */ 322 #define DXD_POPEN_OK 1 323 324 /* do you need to declare the system error list explicitly? */ 325 #define DXD_SYSERRLIST_DECL 1 326 327 /* do the printf-type routines return a pointer or a count? */ 328 #define DXD_PRINTF_RETURNS_COUNT 1 329 330 /* socket-specific ifdefs */ 331 #define DXD_SOCKET_UNIXDOMAIN_OK 1 332 #define DXD_NEEDS_SYS_SELECT_H 1 333 #define DXD_HAS_GETDTABLESIZE 1 334 #define DXD_HAS_GETHOSTBYNAME 1 335 336 /* is the SigDanger signal defined? (indicates running low on page space) */ 337 #define DXD_HAS_SIGDANGER 1 338 339 /* can you use rlimit to stop the exec from creating a huge core file? */ 340 #define DXD_HAS_RLIMIT 1 341 342 /* is hardware device coordinates orientation right-handed? */ 343 #define DXD_HW_DC_RIGHT_HANDED 1 344 345 /* Does the X server behave correctly for a move of a GL window */ 346 #define DXD_HW_XSERVER_MOVE_OK 1 347 348 /* has nonstandard include file and ifdefs for the access() system call? */ 349 #define DXD_SPECIAL_ACCESS 1 350 351 /* can use the crypt system call for data encryption */ 352 #define DXD_HAS_CRYPT 1 353 354 /* system includes are in /usr/include/sys and /usr/include/unistd.h exists */ 355 #define DXD_HAS_UNIX_SYS_INCLUDES 1 356 #define DXD_HAS_UNISTD_H 1 357 358 #endif /* ibm6000 */ 359 360 361 /* sun sparc II 362 */ 363 #ifdef sun4 364 365 #include <sys/types.h> 366 367 /* license manager active in this version */ 368 #undef DXD_LICENSED_VERSION 369 370 /* supports full IEEE standard floating point, including under/overflow */ 371 #define DXD_STANDARD_IEEE 1 372 373 /* hardware rendering is an option? */ 374 #define DXD_CAN_HAVE_HW_RENDERING 1 375 376 /* supports popen() */ 377 #define DXD_POPEN_OK 1 378 379 /* do you need to declare the system error list explicitly? */ 380 #define DXD_SYSERRLIST_DECL 1 381 382 /* socket-specific ifdefs */ 383 #define DXD_SOCKET_UNIXDOMAIN_OK 1 384 #define DXD_HAS_GETDTABLESIZE 1 385 #define DXD_HAS_GETHOSTBYNAME 1 386 387 /* can you use rlimit to stop the exec from creating a huge core file? */ 388 #define DXD_HAS_RLIMIT 1 389 390 /* is hardware sensitive to vertex orientation of 1st triangle in strip? */ 391 #define DXD_HW_TMESH_ORIENT_SENSITIVE 1 392 393 /* Does the X server behave correctly for a move of a XGL window */ 394 #define DXD_HW_XSERVER_MOVE_OK 1 395 396 /* can use the crypt system call for data encryption */ 397 #define DXD_HAS_CRYPT 1 398 399 /* system includes are in /usr/include/sys and /usr/include/unistd.h exists */ 400 #define DXD_HAS_UNIX_SYS_INCLUDES 1 401 #define DXD_HAS_UNISTD_H 1 402 403 /* system includes support for the vfork() system call */ 404 #define DXD_HAS_VFORK 1 405 406 #endif /* sun4 */ 407 408 409 /* sun sparc solaris 410 */ 411 #ifdef solaris 412 413 #include <sys/types.h> 414 415 /* license manager active in this version */ 416 #undef DXD_LICENSED_VERSION 417 418 /* supports full IEEE standard floating point, including under/overflow */ 419 #define DXD_STANDARD_IEEE 1 420 421 /* defined if we support multiprocessor version */ 422 #define DXD_IS_MP 1 423 424 /* do we need to keep a parent wait-process around? */ 425 #define DXD_EXEC_WAIT_PROCESS 1 426 427 428 /* does this system support sysconf(3)? */ 429 #define DXD_HAS_SYSCONF 1 430 431 /* hardware rendering is an option? */ 432 #define DXD_CAN_HAVE_HW_RENDERING 1 433 434 /* supports popen() */ 435 #define DXD_POPEN_OK 1 436 437 /* do you need to declare the system error list explicitly? */ 438 #define DXD_SYSERRLIST_DECL 1 439 440 /* socket-specific ifdefs */ 441 #define DXD_SOCKET_UNIXDOMAIN_OK 1 442 #define DXD_HAS_GETHOSTBYNAME 1 443 #define MAXFUPLIM FD_SETSIZE 444 445 /* can you use rlimit to stop the exec from creating a huge core file? */ 446 #define DXD_HAS_RLIMIT 1 447 448 /* is hardware sensitive to vertex orientation of 1st triangle in strip? */ 449 #define DXD_HW_TMESH_ORIENT_SENSITIVE 1 450 451 /* can use the crypt system call for data encryption */ 452 #define DXD_HAS_CRYPT 1 453 454 /* the system routine herror() doesn't exist on this architecture */ 455 #define herror perror 456 457 458 /* wait(int *) for solaris */ 459 union wait{ 460 int status; 461 }; 462 463 /* bcopy,bcmp,bzero these are in /usr/ucb/libucb.a on solaris 464 * this is the BSD compatibilty section and may not be there in future */ 465 #if !defined(HAVE_STRINGS_H) 466 #define bcopy(s,d,n) memcpy((void *)(d),(void *)(s),(int)(n)) 467 #define bzero(s,n) memset((void *)(s),0,(int)(n)) 468 #define bcmp(s1,s2,n) memcmp((void *)(s1),(void *)(s2),(int)(n)) 469 #endif 470 471 /* Use sun mutex type locks unless we are using Purify which gets upset 472 * about the threads library 473 */ 474 #ifdef __PURIFY__ 475 # define DXD_USE_MUTEX_LOCKS 0 476 #else 477 # define DXD_USE_MUTEX_LOCKS 1 478 #endif 479 480 /* system includes are in /usr/include/sys and /usr/include/unistd.h exists */ 481 #define DXD_HAS_UNIX_SYS_INCLUDES 1 482 #define DXD_HAS_UNISTD_H 1 483 484 /* cannot load runtime-loadable modules after forking */ 485 #define DXD_NO_MP_RUNTIME 1 486 487 /* system includes support for the vfork() system call */ 488 #define DXD_HAS_VFORK 1 489 490 491 #endif /* solaris */ 492 493 494 /* data general AViiON 495 */ 496 #ifdef aviion 497 498 #include <sys/types.h> 499 500 /* license manager active in this version */ 501 #undef DXD_LICENSED_VERSION 502 503 /* supports full IEEE standard floating point, including under/overflow */ 504 #define DXD_STANDARD_IEEE 1 505 506 /* supports popen() */ 507 #define DXD_POPEN_OK 1 508 509 /* do you need to declare the system error list explicitly? */ 510 #define DXD_SYSERRLIST_DECL 1 511 512 /* do the printf-type routines return a pointer or a count? */ 513 #define DXD_PRINTF_RETURNS_COUNT 1 514 515 /* socket-specific ifdefs */ 516 #define DXD_SOCKET_UNIXDOMAIN_OK 1 517 #define DXD_HAS_GETDTABLESIZE 1 518 #define DXD_HAS_GETHOSTBYNAME 1 519 520 /* can you use rlimit to stop the exec from creating a huge core file? */ 521 #define DXD_HAS_RLIMIT 1 522 523 /* can use the crypt system call for data encryption */ 524 #define DXD_HAS_CRYPT 1 525 526 /* the system routine herror() doesn't exist on this architecture */ 527 #define herror perror 528 529 /* system includes are in /usr/include/sys and /usr/include/unistd.h exists */ 530 #define DXD_HAS_UNIX_SYS_INCLUDES 1 531 #define DXD_HAS_UNISTD_H 1 532 533 /* system includes support for the vfork() system call */ 534 #define DXD_HAS_VFORK 1 535 536 #endif /* aviion */ 537 538 #if defined(intelnt) || defined(WIN32) 539 540 #ifdef snprintf 541 #undef snprintf 542 #endif 543 #define snprintf _snprintf 544 545 #ifdef vsnprintf 546 #undef vsnprintf 547 #endif 548 #define vsnprintf _vsnprintf 549 550 #if defined(alloca) 551 #undef alloca 552 #endif 553 #define alloca _alloca 554 555 #undef DXD_PROCESSOR_STATUS 556 557 #undef IOCTL 558 #define IOCTL(fd,cmd,buf) \ 559 ioctlsocket(fd,cmd,(u_long *)buf) 560 561 562 #if defined(DXD_EXEC_WAIT_PROCESS) 563 #undef DXD_EXEC_WAIT_PROCESS 564 #endif 565 566 #define DXD_EXEC_WAIT_PROCESS 0 567 568 569 #define DXD_SYSERRLIST_DECL 1 570 #define DXD_PRINTF_RETURNS_COUNT 1 571 #define DXD_SOCKET_WINSOCKETS_OK 1 572 573 /* We have to assume that DXD_WIN is for NT on Intel 574 Machines, else we have to change all occurances 575 */ 576 #include <sys/types.h> 577 578 #define DXD_WIN 579 #define DXD_POPEN_OK 1 580 581 #if !defined(HAVE_ISNAN) 582 #define isnan _isnan 583 #define HAVE_ISNAN 1 584 #endif 585 586 #if !defined(HAVE_FINITE) 587 #define finite _finite 588 #define HAVE_FINITE 1 589 #endif 590 591 /* supports popen() */ 592 #define DXD_OS_NON_UNIX 1 593 #define DXD_HAS_WINSOCKETS 1 594 #define MAXHOSTNAMELEN 128 595 #define MAXPATHLEN 255 596 597 #define DXD_SOCKET_WINSOCKETS_OK 1 598 #define socklen_t int 599 600 /* to port directories on PC enviroments */ 601 #define DXD_NON_UNIX_DIR_SEPARATOR 1 602 #define DXD_NON_UNIX_ENV_SEPARATOR 1 603 604 /* #define _WINERROR_ 1 */ 605 /* #define _DLGSH_INCLUDED_ 1 */ 606 607 #include <errno.h> 608 609 /* do you need to declare the system error list explicitly? */ 610 611 #define DXD_SYSERRLIST_DECL 1 612 613 /* do the printf-type routines return a pointer or a count? */ 614 #define DXD_PRINTF_RETURNS_COUNT 1 615 616 #define DXD_SELECTPTR_DEFINED 1 617 618 #define DXD_HAS_GETDTABLESIZE 1 619 /* #define DXD_NEEDS_SYS_SELECT_H 1 */ 620 621 /* defining DXD_STANDARD_IEEE will solve some of the setjump/longjump problmes 622 in _compoper.c */ 623 #define DXD_STANDARD_IEEE 1 624 625 626 #define DXD_LACKS_UNIX_UID 1 627 628 629 #include <string.h> 630 #include <stdio.h> 631 632 /* fix ioctl and socket prototypes, use send/recv for read and write */ 633 #define BSD_SELECT 1 634 #include <sys/types.h> 635 636 /* #include <sys/select.h> : In windows.h */ 637 638 #undef LONG 639 #undef SHORT 640 #undef CHAR 641 642 /* stolen from /usr/include/math.h */ 643 /* these exist in the C++ include file complex.h */ 644 645 #define herror WSAGetLastError() 646 647 /* 648 * file descriptor io functions for non unix (nu) platforms 649 */ 650 /* Declarations files, required in OS2, NT */ 651 #include <io.h> 652 #include <process.h> 653 #include <direct.h> 654 655 #if defined(__cplusplus) || defined(c_plusplus) 656 extern "C" { 657 #endif 658 int gettablesize(void); 659 int getopt(int,char**,char*); 660 #if defined(__cplusplus) || defined(c_plusplus) 661 } 662 #endif 663 664 #if defined(cygwin) 665 #include <sys/types.h> 666 667 #define fopen(file,mode) _dxf_nu_fopen(file,mode"O_BINARY") 668 #define open(path,oflag) _open(path,oflag|O_BINARY&(~O_CREAT),0,mode"O_BINARY") 669 #define creat(path,mode) _open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, mode"O_BINARY") 670 671 #endif 672 673 #if 0 674 #define fork DXWinFork 675 #endif 676 677 #define bcopy(s,d,n) memcpy((void *)(d),(void *)(s),(int)(n)) 678 #define bzero(s,n) memset((void *)(s),0,(int)(n)) 679 #define bcmp(s1,s2,n) memcmp((void *)(s1),(void *)(s2),(int)(n)) 680 681 682 #define wait(status) cwait(status, status, 0) 683 #define trunc(value) ((double)((int)(value))) 684 #define rint(value) ((float)((int)((value) + 0.5))) 685 686 #endif /* intelnt */ 687 688 /* Dec Alpha AXP OSF/1 689 */ 690 #ifdef alphax 691 692 /* supports full IEEE standard floating point, including under/overflow */ 693 #define DXD_STANDARD_IEEE 0 694 695 /* license manager active in this version */ 696 #undef DXD_LICENSED_VERSION 697 698 /* supports popen() */ 699 #define DXD_POPEN_OK 1 700 701 /* compiler apparently doesn't parse \a as alert */ 702 #define DXD_NO_ANSI_ALERT 1 703 704 #define DXD_FIXEDSIZES 1 705 706 #endif /* alphax */ 707 708 709 710 /* if standard IEEE floating point, these are the constants. the 711 * pvs is slightly different in that it can't handle underflow 712 * or overflow floats without hardware traps. 713 */ 714 715 /* defined in one place for all supported architectures */ 716 #define DXD_MAX_BYTE 127 717 #define DXD_MIN_BYTE -128 718 719 #define DXD_MAX_UBYTE 255 720 721 #define DXD_MAX_SHORT 32767 722 #define DXD_MIN_SHORT -32768 723 724 #define DXD_MAX_USHORT 65535 725 726 #define DXD_MAX_INT 2147483647 727 #define DXD_MIN_INT -2147483648 728 729 #define DXD_MAX_UINT 4294967295U 730 731 /* same whether denormalized numbers are supported nor not */ 732 #define DXD_MAX_FLOAT ((float)3.40282346638528860e+38) 733 #define DXD_FLOAT_EPSILON ((float)1.1920928955078125e-7) 734 #define DXD_MAX_DOUBLE 1.7976931348623157e+308 735 #define DXD_DOUBLE_EPSILON 2.2204460492503131e-16 736 737 #if DXD_STANDARD_IEEE 738 #define DXD_MIN_FLOAT ((float)1.40129846432481707e-45) 739 #define DXD_MIN_DOUBLE 4.94065645841246544e-324 740 #else /* denormalized numbers cause traps on i860 */ 741 #define DXD_MIN_FLOAT ((float)1.1754943508222875e-38) 742 #define DXD_MIN_DOUBLE 2.2250738585072014e-308 743 #endif 744 745 #ifndef DXD_HW_REPARENT_OFFSET_X 746 #define DXD_HW_REPARENT_OFFSET_X 0 747 #endif 748 749 #ifndef DXD_HW_REPARENT_OFFSET_Y 750 #define DXD_HW_REPARENT_OFFSET_Y 0 751 #endif 752 753 #ifndef DXD_HW_XSERVER_MOVE_OK 754 #define DXD_HW_XSERVER_MOVE_OK 0 755 #endif 756 757 /* fixed type sizes */ 758 #ifndef DXD_FIXEDSIZES 759 #define DXD_FIXEDSIZES 1 760 #endif 761 762 #define CHAR_READY(fp) F_CHAR_READY(fp) 763 #ifdef GETC 764 #undef GETC 765 #endif 766 #define GETC(file) getc(file) 767 768 #endif /* whole file _DXI_ARCH_H */ 769 770