annotate src/sunOS-fix.c @ 404:2f8bb876ab1d r21-2-32

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