Home | History | Annotate | Line # | Download | only in sunos32
sunos32.h revision 1.12.28.1
      1  1.12.28.1       mjf /*	$NetBSD: sunos32.h,v 1.12.28.1 2008/06/02 13:23:08 mjf Exp $	 */
      2        1.1       mrg 
      3        1.1       mrg /*
      4        1.1       mrg  * Copyright (c) 2001 Matthew R. Green
      5        1.1       mrg  * All rights reserved.
      6        1.1       mrg  *
      7        1.1       mrg  * Redistribution and use in source and binary forms, with or without
      8        1.1       mrg  * modification, are permitted provided that the following conditions
      9        1.1       mrg  * are met:
     10        1.1       mrg  * 1. Redistributions of source code must retain the above copyright
     11        1.1       mrg  *    notice, this list of conditions and the following disclaimer.
     12        1.1       mrg  * 2. Redistributions in binary form must reproduce the above copyright
     13        1.1       mrg  *    notice, this list of conditions and the following disclaimer in the
     14        1.1       mrg  *    documentation and/or other materials provided with the distribution.
     15        1.1       mrg  *
     16        1.1       mrg  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17        1.1       mrg  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18        1.1       mrg  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19        1.1       mrg  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20        1.1       mrg  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     21        1.1       mrg  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     22        1.1       mrg  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     23        1.1       mrg  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     24        1.1       mrg  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25        1.1       mrg  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26        1.1       mrg  * SUCH DAMAGE.
     27        1.1       mrg  */
     28        1.1       mrg 
     29        1.1       mrg #ifndef _COMPAT_SUNOS32_SUNOS32_H_
     30        1.1       mrg #define _COMPAT_SUNOS32_SUNOS32_H_
     31        1.1       mrg 
     32        1.1       mrg /*
     33        1.1       mrg  * 32-bit SunOS 4.x compatibility module.
     34        1.1       mrg  */
     35        1.1       mrg 
     36        1.1       mrg #include <compat/sunos/sunos.h>
     37        1.1       mrg 
     38        1.1       mrg /*
     39        1.1       mrg  * Typedefs for pointer-types.
     40        1.1       mrg  */
     41        1.1       mrg /* stime() */
     42       1.12       dsl typedef netbsd32_pointer_t sunos32_time_tp;
     43        1.1       mrg 
     44        1.1       mrg /* statfs(), fstatfs() */
     45       1.12       dsl typedef netbsd32_pointer_t sunos32_statfsp_t;
     46        1.1       mrg 
     47        1.1       mrg /* ustat() */
     48       1.10       dsl typedef netbsd32_pointer_t sunos32_ustatp_t;
     49        1.1       mrg 
     50        1.1       mrg /* uname() */
     51       1.10       dsl typedef netbsd32_pointer_t sunos32_utsnamep_t;
     52        1.1       mrg 
     53        1.1       mrg /*
     54        1.1       mrg  * general prototypes
     55        1.1       mrg  */
     56        1.1       mrg __BEGIN_DECLS
     57        1.1       mrg /* Defined in arch/<arch>/sunos_machdep.c */
     58        1.6  christos void	sunos32_sendsig(const ksiginfo_t *, const sigset_t *);
     59        1.1       mrg __END_DECLS
     60        1.1       mrg 
     61        1.1       mrg /*
     62        1.1       mrg  * here are some macros to convert between sunos32 and sparc64 types.
     63        1.1       mrg  * note that they do *NOT* act like good macros and put ()'s around all
     64        1.1       mrg  * arguments cuz this _breaks_ SCARG().
     65        1.1       mrg  */
     66        1.1       mrg #define SUNOS32TO64(s32uap, uap, name) \
     67        1.1       mrg 	    SCARG(uap, name) = SCARG(s32uap, name)
     68        1.1       mrg #define SUNOS32TOP(s32uap, uap, name, type) \
     69       1.10       dsl 	    SCARG(uap, name) = SCARG_P32(s32uap, name)
     70        1.1       mrg #define SUNOS32TOX(s32uap, uap, name, type) \
     71        1.1       mrg 	    SCARG(uap, name) = (type)SCARG(s32uap, name)
     72        1.1       mrg #define SUNOS32TOX64(s32uap, uap, name, type) \
     73        1.1       mrg 	    SCARG(uap, name) = (type)(u_long)SCARG(s32uap, name)
     74        1.1       mrg 
     75        1.1       mrg /* and some standard versions */
     76        1.1       mrg #define	SUNOS32TO64_UAP(name)		SUNOS32TO64(uap, &ua, name);
     77        1.1       mrg #define	SUNOS32TOP_UAP(name, type)	SUNOS32TOP(uap, &ua, name, type);
     78        1.1       mrg #define	SUNOS32TOX_UAP(name, type)	SUNOS32TOX(uap, &ua, name, type);
     79        1.1       mrg #define	SUNOS32TOX64_UAP(name, type)	SUNOS32TOX64(uap, &ua, name, type);
     80        1.1       mrg 
     81        1.1       mrg #endif /* _COMPAT_SUNOS32_SUNOS32_H_ */
     82