2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 * File: sbstdinc.h $TOG: sbstdinc.h /main/7 1998/07/31 17:50:45 mgreess $
27 * (c) Copyright 1988, Hewlett-Packard Company, all rights reserved.
29 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
30 * (c) Copyright 1993, 1994 International Business Machines Corp. *
31 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
32 * (c) Copyright 1993, 1994 Novell, Inc. *
38 #include <sys/types.h>
39 #include <sys/param.h>
42 #include <netdb.h> /* MAXHOSTNAMELEN */
46 #define howmany(x, y) (((x)+((y)-1))/(y)) /* From <sys/param.h>, but not an XPG3 file */
57 /************************************************************************/
58 /* Routines not defined in include files (yet). */
59 /************************************************************************/
61 /* Domain/OS BSD has bzero(), bcmp(), and bcopy() defined. */
62 #if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED)
65 #if !defined(linux) && !defined(_XFUNCS_H_) && !defined(sun)
66 extern void bcopy(char *b1, char *b2, int length);
67 extern int bcmp(char *b1, char *b2, int length);
68 extern void bzero(char *b, int length);
71 extern char *mktemp(char *tmplate);
72 #elif ! defined(__cplusplus)
73 #if !defined(linux) && !defined(_XFUNCS_H_)
79 extern char *mktemp();
85 #ifndef SBSTDINC_H_NO_REDEFINE /* sbstdinc.c turns this on */
87 /************************************************************************/
88 /* Routines from <string.h> */
89 /* --- These always get redefined so we can catch null ptr deref's */
90 /************************************************************************/
92 #if defined(__STDC__) || defined(__cplusplus)
93 extern XeString Xestrcat(XeString s1, ConstXeString s2);
95 extern XeString Xestrcat();
100 #define strcat Xestrcat
102 #if defined(__STDC__) || defined(__cplusplus)
103 extern XeString Xestrncat(XeString s1, ConstXeString s2, size_t n);
105 extern XeString Xestrncat();
110 #define strncat Xestrncat
112 #if defined(__STDC__) || defined(__cplusplus)
113 extern int Xestrcmp(ConstXeString s1, ConstXeString s2);
115 extern int Xestrcmp();
120 #define strcmp Xestrcmp
122 #if defined(__STDC__) || defined(__cplusplus)
123 extern int Xestrncmp(ConstXeString s1, ConstXeString s2, size_t n);
125 extern int Xestrncmp();
130 #define strncmp Xestrncmp
132 #if defined(__STDC__) || defined(__cplusplus)
133 extern XeString Xestrcpy(XeString s1, ConstXeString s2);
135 extern XeString Xestrcpy();
140 #define strcpy Xestrcpy
142 #if defined(__STDC__) || defined(__cplusplus)
143 extern XeString Xestrncpy(XeString s1, ConstXeString s2, size_t n);
145 extern XeString Xestrncpy();
150 #define strncpy Xestrncpy
152 #if defined(__STDC__) || defined(__cplusplus)
153 extern int Xestrcoll(ConstXeString s1, ConstXeString s2);
155 extern int Xestrcoll();
160 #define strcoll Xestrcoll
162 #if defined(__STDC__) || defined(__cplusplus)
163 extern size_t Xestrxfrm(XeString s1, ConstXeString s2, size_t n);
165 extern size_t Xestrxfrm();
170 #define strxfrm Xestrxfrm
172 #if defined(__STDC__) || defined(__cplusplus)
173 extern XeString Xestrchr(ConstXeString s, int c);
175 extern XeString Xestrchr();
180 #define strchr Xestrchr
182 #if defined(__STDC__) || defined(__cplusplus)
183 extern XeString Xestrpbrk(ConstXeString s1, ConstXeString s2);
185 extern XeString Xestrpbrk();
190 #define strpbrk Xestrpbrk
192 #if defined(__STDC__) || defined(__cplusplus)
193 extern XeString Xestrrchr(ConstXeString s, int c);
195 extern XeString Xestrrchr();
200 #define strrchr Xestrrchr
202 #if defined(__STDC__) || defined(__cplusplus)
203 extern XeString Xestrstr(ConstXeString s1, ConstXeString s2);
205 extern XeString Xestrstr();
210 #define strstr Xestrstr
212 #if defined(__STDC__) || defined(__cplusplus)
213 extern XeString Xestrtok(XeString s1, ConstXeString s2);
215 extern XeString Xestrtok();
220 #define strtok Xestrtok
222 #if defined(__STDC__) || defined(__cplusplus)
223 extern size_t Xestrlen(ConstXeString s);
225 extern size_t Xestrlen();
230 #define strlen Xestrlen
232 #if defined(__STDC__) || defined(__cplusplus)
233 extern XeString Xestrdup(ConstXeString s);
235 extern XeString Xestrdup();
240 #define strdup Xestrdup
242 #endif /* ifndef SBSTDINC_H_NO_REDEFINE */
244 #endif /* _sbstdinc_h */