os/ossrv/genericopenlibs/openenvcore/include/stddef.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*-
sl@0
     2
 * © Portions copyright (c) 2005 Nokia Corporation.  All rights reserved.
sl@0
     3
 * Copyright (c) 1990, 1993
sl@0
     4
 *	The Regents of the University of California.  All rights reserved.
sl@0
     5
 *
sl@0
     6
 * Redistribution and use in source and binary forms, with or without
sl@0
     7
 * modification, are permitted provided that the following conditions
sl@0
     8
 * are met:
sl@0
     9
 * 1. Redistributions of source code must retain the above copyright
sl@0
    10
 *    notice, this list of conditions and the following disclaimer.
sl@0
    11
 * 2. Redistributions in binary form must reproduce the above copyright
sl@0
    12
 *    notice, this list of conditions and the following disclaimer in the
sl@0
    13
 *    documentation and/or other materials provided with the distribution.
sl@0
    14
 * 4. Neither the name of the University nor the names of its contributors
sl@0
    15
 *    may be used to endorse or promote products derived from this software
sl@0
    16
 *    without specific prior written permission.
sl@0
    17
 *
sl@0
    18
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
sl@0
    19
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
sl@0
    20
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
sl@0
    21
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
sl@0
    22
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
sl@0
    23
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
sl@0
    24
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
sl@0
    25
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
sl@0
    26
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
sl@0
    27
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
sl@0
    28
 * SUCH DAMAGE.
sl@0
    29
 *
sl@0
    30
 *	@(#)stddef.h	8.1 (Berkeley) 6/2/93
sl@0
    31
 *
sl@0
    32
 * $FreeBSD: src/include/stddef.h,v 1.10 2003/12/07 21:10:06 marcel Exp $
sl@0
    33
 */
sl@0
    34
sl@0
    35
#ifndef _STDDEF_H_
sl@0
    36
#define _STDDEF_H_
sl@0
    37
sl@0
    38
#include <sys/cdefs.h>
sl@0
    39
#include <sys/_null.h>
sl@0
    40
#include <sys/_types.h>
sl@0
    41
sl@0
    42
typedef	__ptrdiff_t	ptrdiff_t;
sl@0
    43
sl@0
    44
#if __BSD_VISIBLE
sl@0
    45
#ifndef _RUNE_T_DECLARED
sl@0
    46
typedef	__rune_t	rune_t;
sl@0
    47
#define	_RUNE_T_DECLARED
sl@0
    48
#endif
sl@0
    49
#endif
sl@0
    50
sl@0
    51
#ifndef _SIZE_T_DECLARED
sl@0
    52
typedef	__size_t	size_t;
sl@0
    53
#define	_SIZE_T_DECLARED
sl@0
    54
#endif
sl@0
    55
sl@0
    56
#ifndef __SYMBIAN32__
sl@0
    57
#ifndef	__cplusplus
sl@0
    58
#ifndef _WCHAR_T_DECLARED
sl@0
    59
typedef	__wchar_t	wchar_t;
sl@0
    60
#define	_WCHAR_T_DECLARED
sl@0
    61
#endif //_WCHAR_T_DECLARED
sl@0
    62
#endif //__cplusplus
sl@0
    63
#else
sl@0
    64
//C++ built-in wchar data type which doesn't clash with the definition of wchar
sl@0
    65
#if !defined _WCHAR_T_DECLARED && defined __cplusplus && defined __WINSCW__
sl@0
    66
#if __option(wchar_type)
sl@0
    67
#define	_WCHAR_T_DECLARED
sl@0
    68
#endif //__option (wchar_type)
sl@0
    69
#endif //__WINSCW__
sl@0
    70
sl@0
    71
#if !defined _WCHAR_T_DECLARED && !defined __wchar_t_defined
sl@0
    72
#if defined __cplusplus
sl@0
    73
#if defined __WINSCW__
sl@0
    74
typedef unsigned short int wchar_t;
sl@0
    75
#define	_WCHAR_T_DECLARED
sl@0
    76
#endif // __WINSCW__
sl@0
    77
#else
sl@0
    78
typedef unsigned short int wchar_t;
sl@0
    79
#define	_WCHAR_T_DECLARED
sl@0
    80
#endif // __cplusplus 
sl@0
    81
#endif // __wchar_t_defined
sl@0
    82
#endif //__SYMBIAN32__
sl@0
    83
sl@0
    84
#define	offsetof(type, member)	__offsetof(type, member)
sl@0
    85
sl@0
    86
#endif /* _STDDEF_H_ */