Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.7 KiB

  1. /***
  2. *crt0fp.asm - floating point not loaded trap
  3. *
  4. * Copyright (c) 1989-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * To trap certain cases where certain necessary floating-point
  8. * software is not loaded. Two specific cases are when no emulator
  9. * is linked in but no coprocessor is present, and when floating
  10. * point i/o conversions are done, but no floating-point variables
  11. * or expressions are used in the program.
  12. *
  13. *Revision History:
  14. * 06-29-89 PHG module created, based on asm version
  15. * 04-09-90 GJF Added #include <cruntime.h>. Made calling type
  16. * _CALLTYPE1. Also, fixed the copyright.
  17. * 04-10-90 GJF Fixed compiler warnings (-W3).
  18. * 10-08-90 GJF New-style function declarator.
  19. * 10-11-90 GJF Changed _amsg_exit() interface.
  20. * 04-06-93 SKS Replace _CRTAPI* with __cdecl
  21. *
  22. *******************************************************************************/
  23. #include <cruntime.h>
  24. #include <internal.h>
  25. #include <rterr.h>
  26. /***
  27. *_fptrap - trap for missing floating-point software
  28. *
  29. *Purpose:
  30. * Catches these cases of incomplete f.p. software linked into a program.
  31. *
  32. * (1) no coprocessor present, and no emulator linked in
  33. *
  34. * (2) "%e", "%f", and "%g" i/o conversion formats specified, but
  35. * not all conversion software has been linked in, because the
  36. * program did not use any floating-point variables or expressions.
  37. *
  38. *Entry:
  39. * None.
  40. *
  41. *Exit:
  42. * Never returns.
  43. *
  44. *Exceptions:
  45. * Transfers control to _amsg_exit which ...
  46. * - Writes error message to standard error: "floating point not loaded"
  47. * - Terminates the program by calling _exit().
  48. *******************************************************************************/
  49. void __cdecl _fptrap(
  50. void
  51. )
  52. {
  53. _amsg_exit(_RT_FLOAT);
  54. }