VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/x11include/4.3/include/Xfuncs.h@ 2981

Last change on this file since 2981 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/*
2 * $Xorg: Xfuncs.h,v 1.4 2001/02/09 02:03:22 xorgcvs Exp $
3 *
4 *
5Copyright 1990, 1998 The Open Group
6
7Permission to use, copy, modify, distribute, and sell this software and its
8documentation for any purpose is hereby granted without fee, provided that
9the above copyright notice appear in all copies and that both that
10copyright notice and this permission notice appear in supporting
11documentation.
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23Except as contained in this notice, the name of The Open Group shall not be
24used in advertising or otherwise to promote the sale, use or other dealings
25in this Software without prior written authorization from The Open Group.
26 *
27 */
28/* $XFree86: xc/include/Xfuncs.h,v 3.10 2002/05/31 18:45:38 dawes Exp $ */
29
30#ifndef _XFUNCS_H_
31#define _XFUNCS_H_
32
33#include <X11/Xosdefs.h>
34
35/* the old Xfuncs.h, for pre-R6 */
36#if !(defined(XFree86LOADER) && defined(IN_MODULE))
37
38#ifdef X_USEBFUNCS
39void bcopy();
40void bzero();
41int bcmp();
42#else
43#if defined(SYSV)
44#include <memory.h>
45void bcopy();
46#define bzero(b,len) memset(b, 0, len)
47#define bcmp(b1,b2,len) memcmp(b1, b2, len)
48#else
49#include <string.h>
50#define _XFUNCS_H_INCLUDED_STRING_H
51#define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
52#define bzero(b,len) memset(b, 0, (size_t)(len))
53#define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
54#endif
55#endif /* X_USEBFUNCS */
56
57/* the new Xfuncs.h */
58
59#if !defined(X_NOT_STDC_ENV) && (!defined(sun) || defined(SVR4))
60/* the ANSI C way */
61#ifndef _XFUNCS_H_INCLUDED_STRING_H
62#include <string.h>
63#endif
64#undef bzero
65#define bzero(b,len) memset(b,0,len)
66#else /* else X_NOT_STDC_ENV or SunOS 4 */
67#if defined(SYSV) || defined(luna) || defined(sun) || defined(__sxg__)
68#include <memory.h>
69#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
70#if defined(SYSV) && defined(_XBCOPYFUNC)
71#undef memmove
72#define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
73#define _XNEEDBCOPYFUNC
74#endif
75#else /* else vanilla BSD */
76#define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
77#define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
78#define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
79#endif /* SYSV else */
80#endif /* ! X_NOT_STDC_ENV else */
81
82#if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4))
83#define atexit(f) on_exit(f, 0)
84#endif
85
86#endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
87
88#endif /* _XFUNCS_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette