Home | History | Annotate | Line # | Download | only in common
param.h revision 1.1
      1  1.1  thorpej /*	$NetBSD: param.h,v 1.1 2002/01/18 20:39:24 thorpej Exp $	*/
      2  1.1  thorpej 
      3  1.1  thorpej /*
      4  1.1  thorpej  * Copyright (c) 1994, 1995 Jochen Pohl
      5  1.1  thorpej  * All Rights Reserved.
      6  1.1  thorpej  *
      7  1.1  thorpej  * Redistribution and use in source and binary forms, with or without
      8  1.1  thorpej  * modification, are permitted provided that the following conditions
      9  1.1  thorpej  * are met:
     10  1.1  thorpej  * 1. Redistributions of source code must retain the above copyright
     11  1.1  thorpej  *    notice, this list of conditions and the following disclaimer.
     12  1.1  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  thorpej  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  thorpej  *    documentation and/or other materials provided with the distribution.
     15  1.1  thorpej  * 3. All advertising materials mentioning features or use of this software
     16  1.1  thorpej  *    must display the following acknowledgement:
     17  1.1  thorpej  *      This product includes software developed by Jochen Pohl for
     18  1.1  thorpej  *	The NetBSD Project.
     19  1.1  thorpej  * 4. The name of the author may not be used to endorse or promote products
     20  1.1  thorpej  *    derived from this software without specific prior written permission.
     21  1.1  thorpej  *
     22  1.1  thorpej  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     23  1.1  thorpej  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24  1.1  thorpej  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25  1.1  thorpej  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     26  1.1  thorpej  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     27  1.1  thorpej  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  1.1  thorpej  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  1.1  thorpej  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  1.1  thorpej  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     31  1.1  thorpej  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  1.1  thorpej  */
     33  1.1  thorpej 
     34  1.1  thorpej /*
     35  1.1  thorpej  * Minimun size of string buffer. If this is not enough, the buffer
     36  1.1  thorpej  * is enlarged in steps of STRBLEN bytes.
     37  1.1  thorpej  */
     38  1.1  thorpej #define	STRBLEN		256
     39  1.1  thorpej 
     40  1.1  thorpej /*
     41  1.1  thorpej  * This defines the size of memory blocks which are used to allocate
     42  1.1  thorpej  * memory in larger chunks.
     43  1.1  thorpej  */
     44  1.1  thorpej #define	MBLKSIZ		((size_t)0x4000)
     45  1.1  thorpej 
     46  1.1  thorpej /*
     47  1.1  thorpej  * Sizes of hash tables
     48  1.1  thorpej  * Should be a prime. Possible primes are
     49  1.1  thorpej  * 307, 401, 503, 601, 701, 809, 907, 1009, 1103, 1201, 1301, 1409, 1511.
     50  1.1  thorpej  *
     51  1.1  thorpej  * HSHSIZ1	symbol table 1st pass
     52  1.1  thorpej  * HSHSIZ2	symbol table 2nd pass
     53  1.1  thorpej  * THSHSIZ2	type table 2nd pass
     54  1.1  thorpej  */
     55  1.1  thorpej #define	HSHSIZ1		503
     56  1.1  thorpej #define HSHSIZ2		1009
     57  1.1  thorpej #define	THSHSIZ2	1009
     58  1.1  thorpej 
     59  1.1  thorpej /*
     60  1.1  thorpej  * Pull in target-specific parameters.
     61  1.1  thorpej  */
     62  1.1  thorpej #include "targparam.h"
     63  1.1  thorpej 
     64  1.1  thorpej /*
     65  1.1  thorpej  * Make sure this matches wchar_t.
     66  1.1  thorpej  */
     67  1.1  thorpej #define WCHAR	INT
     68  1.1  thorpej 
     69  1.1  thorpej #ifndef __GNUC__
     70  1.1  thorpej #ifndef lint
     71  1.1  thorpej #ifndef QUAD_MAX	/* necessary for mkdep */
     72  1.1  thorpej #define QUAD_MAX	LONG_MAX
     73  1.1  thorpej #define QUAD_MIN	LONG_MIN
     74  1.1  thorpej #define UQUAD_MAX	ULONG_MAX
     75  1.1  thorpej #endif
     76  1.1  thorpej typedef	long	quad_t;
     77  1.1  thorpej typedef	u_long	u_quad_t;
     78  1.1  thorpej #endif
     79  1.1  thorpej #endif
     80  1.1  thorpej 
     81  1.1  thorpej 
     82  1.1  thorpej /*
     83  1.1  thorpej  * long double only in ANSI C.
     84  1.1  thorpej  *
     85  1.1  thorpej  * And the sparc64 long double code generation is broken.
     86  1.1  thorpej  */
     87  1.1  thorpej #if !defined(__sparc64__) && defined(__STDC__)
     88  1.1  thorpej typedef	long double ldbl_t;
     89  1.1  thorpej #else
     90  1.1  thorpej typedef	double	ldbl_t;
     91  1.1  thorpej #endif
     92  1.1  thorpej 
     93  1.1  thorpej /*
     94  1.1  thorpej  * Some traditional compilers are not able to assign structures.
     95  1.1  thorpej  */
     96  1.1  thorpej #ifdef __STDC__
     97  1.1  thorpej #define STRUCT_ASSIGN(dest, src)	(dest) = (src)
     98  1.1  thorpej #else
     99  1.1  thorpej #define STRUCT_ASSIGN(dest, src)	(void)memcpy(&(dest), &(src), \
    100  1.1  thorpej 						     sizeof (dest));
    101  1.1  thorpej #endif
    102