Mercurial > hg > xemacs-beta
comparison src/sunOS-fix.c @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | 850242ba4a81 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 /* This file is part of XEmacs. | |
2 | |
3 XEmacs is free software; you can redistribute it and/or modify it | |
4 under the terms of the GNU General Public License as published by the | |
5 Free Software Foundation; either version 2, or (at your option) any | |
6 later version. | |
7 | |
8 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
9 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
11 for more details. | |
12 | |
13 You should have received a copy of the GNU General Public License | |
14 along with XEmacs; see the file COPYING. If not, write to | |
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
16 Boston, MA 02111-1307, USA. */ | |
17 | |
18 /* Synched up with: Not in FSF. */ | |
19 | |
20 /* If you are using SunOS 4.1.1 and X11r5, then you need this patch. | |
21 There is a stupid bug in the SunOS libc.a: two functions which X11r5 | |
22 uses, mbstowcs() and wcstombs(), are unusable when programs are | |
23 statically linked (as Emacs must be) because the static version of | |
24 libc.a contains the *dynamic* versions of these functions. These | |
25 functions don't seem to be called when Emacs is running, so it's | |
26 enough to define stubs for them. | |
27 | |
28 This appears to be fixed in SunOS 4.1.2. | |
29 */ | |
30 | |
31 #include <config.h> | |
32 | |
33 #ifndef I18N4 /* we actually need these from the library in this case. */ | |
34 | |
35 #ifdef __STDC__ | |
36 | |
37 #include <stdlib.h> | |
38 | |
39 size_t mbstowcs (wchar_t *foo, const char *bar, size_t baz) | |
40 { | |
41 abort (); | |
42 return 0; | |
43 } | |
44 | |
45 size_t wcstombs (char *foo, const wchar_t *bar, size_t baz) | |
46 { | |
47 abort (); | |
48 return 0; | |
49 } | |
50 | |
51 #else | |
52 | |
53 void mbstowcs () | |
54 { | |
55 abort (); | |
56 } | |
57 | |
58 void wcstombs () | |
59 { | |
60 abort (); | |
61 } | |
62 | |
63 #endif /* __STDC__ */ | |
64 | |
65 #endif /* !I18N4 */ |