home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / lucid / lemacs-19.6 / src / sunOS-fix.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-30  |  800 b   |  41 lines

  1. /* If you are using SunOS 4.1.1 and X11r5, then you need this patch.
  2.    There is a stupid bug in the SunOS libc.a: two functions which X11r5
  3.    uses, mbstowcs() and wcstombs(), are unusable when programs are
  4.    statically linked (as Emacs must be) because the static version of
  5.    libc.a contains the *dynamic* versions of these functions.  These
  6.    functions don't seem to be called when Emacs is running, so it's 
  7.    enough to define stubs for them.
  8.  
  9.    This appears to be fixed in SunOS 4.1.2.
  10.  */
  11.  
  12. #ifdef __STDC__
  13.  
  14. #include <stdlib.h>
  15.  
  16. size_t mbstowcs (wchar_t *foo, const char *bar, size_t baz)
  17. {
  18.   abort ();
  19.   return 0;
  20. }
  21.  
  22. size_t wcstombs (char *foo, const wchar_t *bar, size_t baz)
  23. {
  24.   abort ();
  25.   return 0;
  26. }
  27.  
  28. #else
  29.  
  30. void mbstowcs ()
  31. {
  32.   abort ();
  33. }
  34.  
  35. void wcstombs ()
  36. {
  37.   abort ();
  38. }
  39.  
  40. #endif
  41.