HPUX CPU_IS_PA_R[2]






 sysconf(2)                                                       sysconf(2)





 NAME
      sysconf - get configurable system variables

 SYNOPSIS
      #include <unistd.h>

      long sysconf(int name);

      int CPU_IS_PA_RISC(long cpuvers);

      int CPU_IS_HP_MC68K(long cpuvers);

 DESCRIPTION
      sysconf() provides a way for applications to determine the current
      value of a configurable limit or variable.

      The name argument represents the system variable being queried.

      The following table lists the configuration variables whose values can
      be determined by calling sysconf(), and for each variable, the
      associated value of the name argument and the value returned:

      center tab(:); c c c lf4 lf4 lw(2.4i).  Variable:Value of name:Value
      Returned _ AES_OS_VERSION:_SC_AES_OS_VERSION:T{ Version number of
      OSF/AES OSC supported T}

      ARG_MAX:_SC_ARG_MAX:T{ Maximum total length of the arguments for
      exec() in bytes, including environment data (see exec(2)) T}

      ATEXIT_MAX:_SC_ATEXIT_MAX:T{ Maximum number of functions that can be
      registered with atexit() (see atexit(2)) T}

      BC_BASE_MAX:_SC_BC_BASE_MAX:T{ Maximum ibase (input number radix) and
      obase (output number radix) allowed by bc (see bc(1)) T}

      BC_DIM_MAX:_SC_BC_DIM_MAX:T{ Maximum number of elements in an array
      permitted by bc (see bc(1)) T}

      BC_SCALE_MAX:_SC_BC_SCALE_MAX:T{ Maximum scale factor (number of
      digits to the right of the decimal point) allowed by bc (see bc(1)) T}

      BC_STRING_MAX:_SC_BC_STRING_MAX:T{ Maximum length of strings allowed
      by bc (see bc(1)) T}

      CHILD_MAX:_SC_CHILD_MAX:T{ Maximum number of simultaneous processes
      per user ID (see fork(2)) T}

      CLK_TCK:_SC_CLK_TCK:T{ Number of clock intervals per second for
      times() (see times(2)) T}

      CLOCKS_PER_SEC:_SC_CLOCKS_PER_SEC:T{ Number of clock ticks per second



 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 sysconf(2)                                                       sysconf(2)





      for clock() (see clock(3C)) T}

      COLL_WEIGHTS_MAX:_SC_COLL_WEIGHTS_MAX:T{ Maximum number of weights
      that can be assigned to an entry of the LC_COLLATE order keyword in a
      localedef input file (see localedef(1M)) T}

      CPU_VERSION:_SC_CPU_VERSION:T{ Version of CPU architecture (see below)
      T}

      EXPR_NEST_MAX:_SC_EXPR_NEST_MAX:T{ Maximum parenthesis nesting level
      for expr expressions (see expr(1)) T}

      IO_TYPE:_SC_IO_TYPE:T{ Type of I/O drivers the kernel supports (see
      below) T}

      LINE_MAX:_SC_LINE_MAX:T{ Maximum number of bytes in an input line
      (including the newline) for POSIX.2 utilities T}

      NGROUPS_MAX:_SC_NGROUPS_MAX:T{ Maximum number of simultaneous
      supplementary group IDs per process T}

      OPEN_MAX:_SC_OPEN_MAX:T{ Maximum number of files that one process can
      have open at one time T}

      PAGE_SIZE:_SC_PAGE_SIZE:T{ Kernel memory page size T}

      PASS_MAX:_SC_PASS_MAX:T{ Maximum number of significant bytes in a
      password T}

      POSIX_JOB_CONTROL:_SC_JOB_CONTROL:T{ Positive if the system supports
      POSIX job control; -1 otherwise T}

      POSIX_SAVED_IDS:_SC_SAVED_IDS:T{ Positive if each process has a saved
      set-user-ID and a saved set-group-ID; -1 otherwise T}

      POSIX_VERSION:_SC_VERSION:T{ Approval date of the POSIX.1 Standard
      (such as 199009 for POSIX.1-1990) to which the system conforms.  This
      value indicates the year (first four digits) and month (next two
      digits) that the standard was approved by the IEEE Standards Board.
      T}

      POSIX2_C_BIND:_SC_2_C_BIND:T{ Equal to 1 if the POSIX.2 C Language
      Bindings Option is available through the c89 utility; -1 otherwise T}

      POSIX2_C_DEV:_SC_2_C_DEV:T{ Equal to 1 if the POSIX.2 C Language
      Development Utilities Option is supported; -1 otherwise T}

      POSIX2_C_VERSION:_SC_2_C_VERSION:T{ Current version of the POSIX.2 C
      Language Binding Option supported (same format as _POSIX_VERSION); -1
      otherwise.  T}




 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 sysconf(2)                                                       sysconf(2)





      POSIX2_FORT_DEV:_SC_2_FORT_DEV:T{ Equal to 1 if the POSIX.2 FORTRAN
      Development Utilities Option is supported; -1 otherwise T}

      POSIX2_FORT_RUN:_SC_2_FORT_RUN:T{ Equal to 1 if the POSIX.2 Fortran
      Runtime Utilities Option is supported; -1 otherwise T}

      POSIX2_LOCALEDEF:_SC_2_LOCALEDEF:T{ Equal to 1 if locales can be
      created with the POSIX.2 localedef utility; -1 otherwise T}

      POSIX2_SW_DEV:_SC_2_SW_DEV:T{ Equal to 1 if the POSIX.2 Software
      Development Utilities Option is supported; -1 otherwise T}

      POSIX2_UPE:_SC_2_UPE:T{ Equal to 1 if the POSIX.2 User Portability
      Utilities Option is supported; -1 otherwise T}

      POSIX2_VERSION:_SC_2_VERSION:T{ Current version of POSIX.2 (same
      format as _POSIX_VERSION) T}

      RE_DUP_MAX:_SC_RE_DUP_MAX:T{ Maximum number of repeated occurrences of
      a regular expression permitted when using the interval notation
      \{m,n\} (see regcomp(3C)) T}

      SECURITY_CLASS:_SC_SECURITY_CLASS:T{ DoD security level (see below) T}

      STREAM_MAX:_SC_STREAM_MAX:T{ Maximum number of stdio streams that one
      process can have open at one time T}

      TZNAME_MAX:_SC_TZNAME_MAX:T{ Maximum number of bytes in a timezone
      name for the TZ environment variable T}

      XOPEN_CRYPT:_SC_XOPEN_CRYPT:T{ Equal to 1 if the X/Open Encryption
      Feature Group is supported; -1 otherwise T}

      XOPEN_ENH_I18N:_SC_XOPEN_ENH_I18N:T{ Equal to 1 if the X/Open Enhanced
      Internationalization Feature Group is supported; -1 otherwise T}

      XOPEN_SHM:_SC_XOPEN_SHM:T{ Equal to 1 if the X/Open Shared Memory
      Feature Group is supported; -1 otherwise T}

      XOPEN_VERSION:_SC_XOPEN_VERSION:T{ Issue number of X/Open Portability
      Guide supported T}

      Some of the variables in the table are defined as constants in
      <limits.h> (see limits(5)).  The associated values of the name
      argument are defined in <unistd.h>.

      The SECURITY_CLASS variable (returned by sysconf(_SC_SECURITY_CLASS))
      can have the following possible values with meanings as indicated:

      center tab(:); c c af4 lw(3i).  Value:Meaning _ SEC_CLASS_NONE:No DoD
      security level supported



 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992






 sysconf(2)                                                       sysconf(2)





      SEC_CLASS_C2:DoD C2 level security

      SEC_CLASS_B1:DoD B1 level security

      The possible values of the IO_TYPE variable (returned by
      sysconf(_SC_IO_TYPE)) and their meanings are:

      center tab(:); c c af4 lw(3i).  Value:Meaning _
      IO_TYPE_WSIO:Workstation I/O (used by Series 300/400/700)

      IO_TYPE_SIO:Server I/O (used by Series 800)

      Since the Series 700 instruction set is compatible with Series 800 but
      its I/O system differs, IO_TYPE can be used to detect which I/O system
      is present in a single executable program that can be run on either a
      Series 700 or a Series 800.

      The possible values of the CPU_VERSION variable (returned by
      sysconf(_SC_CPU_VERSION)) and their meanings are:

      center tab(:); c c lf4 lw(3i).  Value:Meaning _ CPU_PA_RISC1_0:HP
      Precision Architecture RISC Version 1.0 CPU_PA_RISC1_1:HP Precision
      Architecture RISC Version 1.1

      CPU_HP_MC68020:Motorola MC68020 CPU_HP_MC68030:Motorola MC68030
      CPU_HP_MC68040:Motorola MC68040

      The CPU_IS_PA_RISC() and CPU_IS_HP_MC68K() functions classify cpuvers,
      a value of the CPU_VERSION variable, as to its processor family.

 RETURN VALUE
      Upon successful completion, sysconf() returns the value of the named
      variable.  If the value of name is not valid, sysconf() returns -1 and
      sets errno to indicate the error.  If the variable corresponding to
      name is not defined, sysconf() returns -1, but does not change errno.

      CPU_IS_PA_RISC() returns positive non-zero if cpuvers is an HP PA-RISC
      processor; zero if not.

      CPU_IS_HP_MC68K() returns positive non-zero if cpuvers is a ``Motorola
      MC680x0'' processor; zero if not.

 ERRORS
      sysconf() fails if:

           [EINVAL]            The value of name is not valid.

 EXAMPLES
      The following example determines the number of times the system clock
      ticks each second:




 Hewlett-Packard Company            - 4 -     HP-UX Release 9.0: August 1992






 sysconf(2)                                                       sysconf(2)





           #include <unistd.h>

           long ticks;
             ...

           ticks = sysconf(_SC_CLK_TCK);

      The following example determines whether the current processor is an
      HP PA-RISC machine:

           #include <unistd.h>

           if (CPU_IS_PA_RISC(sysconf(_SC_CPU_VERSION)))
             ...

 WARNINGS
      CPU_IS_PA_RISC() and CPU_IS_HP_MC68K() are implemented as macros.

      Normally, the values returned from sysconf() do not change during the
      lifetime of the calling process.  However, the value of the symbolic
      constant _POSIX_VERSION and thus the value of sysconf(_SC_VERSION) can
      vary under certain circumstances.  If either of the feature test
      macros _POSIX1_1988 or _XPG3 is defined by the programmer prior to
      including <unistd.h>, the value of _POSIX_VERSION is defined as
      198808, in conformance with POSIX.1-1988, FIPS 151-1, and XPG3.
      Otherwise, the value of _POSIX_VERSION is defined as 199009, in
      conformance with POSIX.1-1990.

      Similarly, the value of the symbolic constant _XOPEN_VERSION and thus
      the value of sysconf(_SC_XOPEN_VERSION) can vary under certain
      circumstances.  If the feature test macro _XPG3 is defined by the
      programmer prior to including <unistd.h>, the value of _XOPEN_VERSION
      is defined as 3, in conformance with XPG3.  Otherwise, the value of
      _XOPEN_VERSION is defined as 4, in conformance with XPG4.

      See stdsyms(5) for more information about these feature test macros.

 AUTHOR
      sysconf() was developed by HP and POSIX.

      CPU_IS_PA_RISC() and CPU_IS_HP_MC68K() were developed by HP.

 SEE ALSO
      getconf(1), atexit(2), exec(2), fork(2), getrlimit(2), pathconf(2),
      times(2), clock(3C), regcomp(3C), limits(5), stdsyms(5), unistd(5),
      x_open(5).

 STANDARDS CONFORMANCE
      sysconf(): AES, XPG3, XPG4, FIPS 151-2, POSIX.1, POSIX.2





 Hewlett-Packard Company            - 5 -     HP-UX Release 9.0: August 1992