MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Headers                                            types.h(3HEAD)



NAME
     types.h, types - primitive system data types

SYNOPSIS
     #include 


DESCRIPTION
     The data types defined in  are as follows:

  32-bit Solaris
     The data types listed below are defined in  for
     32-bit Solaris.

       typedef    struct    { int r[1]; } *physadr;
       typedef    long              clockt;
       typedef    long              daddrt;
       typedef    char *            caddrt;
       typedef    unsigned char     unchar;
       typedef    unsigned short    ushort;
       typedef    unsigned int      uint;
       typedef    unsigned long     ulongt;
       typedef    unsigned long     inot;
       typedef    long              uidt;
       typedef    long              gidt;
       typedef    ulongt           nlinkt;
       typedef    ulongt           modet;
       typedef    short             cntt;
       typedef    long              timet;
       typedef    int               labelt[10];
       typedef    ulongt           devt;
       typedef    long              offt;
       typedef    long              pidt;
       typedef    long              paddrt;
       typedef    int               keyt;
       typedef    unsigned char     uset;
       typedef    short             sysidt;
       typedef    short             indext;
       typedef    short             lockt;
       typedef    unsigned int      sizet;
       typedef    long              clockt;
       typedef    long              pidt;


  64-bit Solaris
     The data types listed below are defined in  for
     64-bit Solaris.

       typedef     long        blkcntt
       typedef     long        clockt
       typedef     long        daddrt
       typedef     ulongt     devt



SunOS 5.11           Last change: 6 Oct 2004                    1






Headers                                            types.h(3HEAD)



       typedef     ulongt     fsblkcntt
       typedef     ulongt     fsfilcntt
       typedef     int         gidt
       typedef     int         idt
       typedef     long        inot
       typedef     int         keyt
       typedef     uintt      majort
       typedef     uintt      minort
       typedef     uintt      modet
       typedef     uintt      nlinkt
       typedef     int         pidt
       typedef     ptrdifft   intptrt
       typedef     ulongt     rlimt
       typedef     ulongt     sizet
       typedef     uintt      speedt
       typedef     long        ssizet
       typedef     long        susecondst
       typedef     uintt      tcflagt
       typedef     long        timet
       typedef     int         uidt
       typedef     int         wchart


  Preprocessor Symbols
     For 32-bit programs, pointers and the C data types  int  and
     long  are  all  32-bit  quantities.   For  64-bit  programs,
     pointers and the C data type  long  are  defined  as  64-bit
     quantities.


     The preprocessor symbol ILP32, made visible by  the  inclu-
     sion  of  ,  can  be used with the preprocessor
     #ifdef construct to define sections of  code  that  will  be
     compiled  only as part of a 32-bit version of a given C pro-
     gram.


     The preprocessor symbol LP64 can be used in the same way to
     define  sections  of code that will be compiled only as part
     of a 64-bit version of a given C program. See EXAMPLES.


     This header incorporates definitions of  other  preprocessor
     symbols  that  can  be  useful  when  keeping  code portable
     between different instruction set architectures.

     LITLENDIAN             The natural  byte  order  of  the
     BIGENDIAN                processor.   A  pointer to an int
                                points to the least/most signifi-
                                cant byte of that int.





SunOS 5.11           Last change: 6 Oct 2004                    2






Headers                                            types.h(3HEAD)



     STACKGROWSUPWARD        The processor specific  direction
     STACKGROWSDOWNWARD      of  stack growth. A push onto the
                                stack   increases/decreases   the
                                stack  pointer, so it stores data
                                at   successively    higher/lower
                                addresses.


     CHARISUNSIGNED          The C Compiler implements objects
     CHARISIGNED            of   type  char  as  unsigned  or
                                signed  respectively.   This   is
                                really  an  implementation choice
                                of the compiler, but it is speci-
                                fied  in  the ABI and tends to be
                                uniform across compilers  for  an
                                instruction set architecture.


     CHARALIGNMENT            The   ABI    defines    alignment
     SHORTALIGNMENT           requirements of each of the prim-
     INTALIGNMENT             itive object types.  Some, if not
     LONGALIGNMENT            all,  might  be hardware require-
     LONGLONGALIGNMENT       ments as  well.  The  values  are
     DOUBLEALIGNMENT          expressed in bytes.
     LONGDOUBLEALIGNMENT
     POINTERALIGNMENT
     FMLAOXATALAILGINGMNEMNETNT           The  most   stringent   alignment
                                requirement  as  specified by the
                                ABI. Equal to the maximum of  all
                                the above XALIGNMENT values.


     LONGLONGALIGNMENT32    The 32-bit  ABI  supported  by  a
                                64-bit  kernel may have different
                                alignment requirements for primi-
                                tive  object  types. The value of
                                this identifier is  expressed  in
                                bytes.


USAGE
     The daddrt type is used for disk  addresses  except  in  an
     inode  on  disk. Times are encoded in seconds since 00:00:00
     UTC, January 1, 1970. The major and minor parts of a  device
     code  specify  kind  and  unit  number  of  a device and are
     installation-dependent. Offsets are measured in  bytes  from
     the beginning of a file.


     The labelt[] types are used to  save  the  processor  state
     while another process is running.




SunOS 5.11           Last change: 6 Oct 2004                    3






Headers                                            types.h(3HEAD)



EXAMPLES
     Example 1 Use of preprocessor symbol LP64.


     In the following  example,  the  preprocessor  symbol  LP64
     defines  sections of code that will be compiled only as part
     of a 64-bit version of the given C program.


       #include 
       ...

       #ifdef LP64
               printf("The data model is LP64 in this environment\n");
       #else
       #ifdef ILP32
               printf("The data model is ILP32 in this environment\n");
       #else
       #error "Unknown data model!"
       #endif
       #endif


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Stable                      
    


SEE ALSO
     types32.h(3HEAD), attributes(5), standards(5)

















SunOS 5.11           Last change: 6 Oct 2004                    4



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™