---
name: "lconv"
section: "3"
platform: "linux"
package: "manpages"
version: "5.10-1"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/system_data_types"
---

# lconv(3)

overview of system data types

Part of [system\_data\_types(7)](/system_data_types/7.md).

## NAME

system\_data\_types - overview of system data types

## DESCRIPTION

- *aiocb*

  *Include*: *\<aio.h\>*.

  ```
  struct aiocb {
      int             aio_fildes;    /* File descriptor */
      off_t           aio_offset;    /* File offset */
      volatile void  *aio_buf;       /* Location of buffer */
      size_t          aio_nbytes;    /* Length of transfer */
      int             aio_reqprio;   /* Request priority offset */
      struct sigevent aio_sigevent;  /* Signal number and value */
      int             aio_lio_opcode;/* Operation to be performed */
  };
  ```

  For further information about this structure, see [**aio**(7)](/aio/7.md).

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**aio\_cancel**(3)](/aio_cancel/3.md), [**aio\_error**(3)](/aio_error/3.md), [**aio\_fsync**(3)](/aio_fsync/3.md), [**aio\_read**(3)](/aio_read/3.md), [**aio\_return**(3)](/aio_return/3.md), [**aio\_suspend**(3)](/aio_suspend/3.md), [**aio\_write**(3)](/aio_write/3.md), [**lio\_listio**(3)](/lio_listio/3.md)

- *clock\_t*

  *Include*: *\<time.h\>* or *\<sys/types.h\>*. Alternatively, *\<sys/time.h\>*.

  Used for system time in clock ticks or **CLOCKS\_PER\_SEC** (defined in *\<time.h\>*). According to POSIX, it shall be an integer type or a real-floating type.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**times**(2)](/times/2.md), [**clock**(3)](/clock/3.md)

- *clockid\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<time.h\>*.

  Used for clock ID type in the clock and timer functions. According to POSIX, it shall be defined as an arithmetic type.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**clock\_adjtime**(2)](/clock_adjtime/2.md), [**clock\_getres**(2)](/clock_getres/2.md), [**clock\_nanosleep**(2)](/clock_nanosleep/2.md), [**timer\_create**(2)](/timer_create/2.md), [**clock\_getcpuclockid**(3)](/clock_getcpuclockid/3.md)

- *dev\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<sys/stat.h\>*.

  Used for device IDs. According to POSIX, it shall be an integer type. For further details of this type, see [**makedev**(3)](/makedev/3.md).

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**mknod**(2)](/mknod/2.md), [**stat**(2)](/stat/2.md)

- *div\_t*

  *Include*: *\<stdlib.h\>*.

  ```
  typedef struct {
      int quot; /* Quotient */
      int rem;  /* Remainder */
  } div_t;
  ```

  It is the type of the value returned by the [**div**(3)](/div/3.md) function.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**div**(3)](/div/3.md)

- *double\_t*

  *Include*: *\<math.h\>*.

  The implementation's most efficient floating type at least as wide as *double*. Its type depends on the value of the macro **FLT\_EVAL\_METHOD** (defined in *\<float.h\>*):

  - 0

    *double\_t* is *double*.

  - 1

    *double\_t* is *double*.

  - 2

    *double\_t* is *long double*.

  For other values of **FLT\_EVAL\_METHOD**, the type of *double\_t* is implementation-defined.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: the *float\_t* type in this page.

- *fd\_set*

  *Include*: *\<sys/select.h\>*. Alternatively, *\<sys/time.h\>*.

  A structure type that can represent a set of file descriptors. According to POSIX, the maximum number of file descriptors in an *fd\_set* structure is the value of the macro **FD\_SETSIZE**.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**select**(2)](/select/2.md)

- *fenv\_t*

  *Include*: *\<fenv.h\>*.

  This type represents the entire floating-point environment, including control modes and status flags; for further details, see [**fenv**(3)](/fenv/3.md).

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**fenv**(3)](/fenv/3.md)

- *fexcept\_t*

  *Include*: *\<fenv.h\>*.

  This type represents the floating-point status flags collectively; for further details see [**fenv**(3)](/fenv/3.md).

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**fenv**(3)](/fenv/3.md)

- *FILE*

  *Include*: *\<stdio.h\>*. Alternatively, *\<wchar.h\>*.

  An object type used for streams.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**fclose**(3)](/fclose/3.md), [**flockfile**(3)](/flockfile/3.md), [**fopen**(3)](/fopen/3.md), [**fprintf**(3)](/fprintf/3.md), [**fread**(3)](/fread/3.md), [**fscanf**(3)](/fscanf/3.md), [**stdin**(3)](/stdin/3.md), [**stdio**(3)](/stdio/3.md)

- *float\_t*

  *Include*: *\<math.h\>*.

  The implementation's most efficient floating type at least as wide as *float*. Its type depends on the value of the macro **FLT\_EVAL\_METHOD** (defined in *\<float.h\>*):

  - 0

    *float\_t* is *float*.

  - 1

    *float\_t* is *double*.

  - 2

    *float\_t* is *long double*.

  For other values of **FLT\_EVAL\_METHOD**, the type of *float\_t* is implementation-defined.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: the *double\_t* type in this page.

- *gid\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<grp.h\>*, *\<pwd.h\>*, *\<signal.h\>*, *\<stropts.h\>*, *\<sys/ipc.h\>*, *\<sys/stat.h\>*, or *\<unistd.h\>*.

  A type used to hold group IDs. According to POSIX, this shall be an integer type.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**chown**(2)](/chown/2.md), [**getgid**(2)](/getgid/2.md), [**getegid**(2)](/getegid/2.md), [**getgroups**(2)](/getgroups/2.md), [**getresgid**(2)](/getresgid/2.md), **getgrnam**(2), [**credentials**(7)](/credentials/7.md)

- *id\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<sys/resource.h\>*.

  A type used to hold a general identifier. According to POSIX, this shall be an integer type that can be used to contain a *pid\_t*, *uid\_t*, or *gid\_t*.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**getpriority**(2)](/getpriority/2.md), [**waitid**(2)](/waitid/2.md)

- *imaxdiv\_t*

  *Include*: *\<inttypes.h\>*.

  ```
  typedef struct {
      intmax_t    quot; /* Quotient */
      intmax_t    rem;  /* Remainder */
  } imaxdiv_t;
  ```

  It is the type of the value returned by the [**imaxdiv**(3)](/imaxdiv/3.md) function.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**imaxdiv**(3)](/imaxdiv/3.md)

- *intmax\_t*

  *Include*: *\<stdint.h\>*. Alternatively, *\<inttypes.h\>*.

  A signed integer type capable of representing any value of any signed integer type supported by the implementation. According to the C language standard, it shall be capable of storing values in the range \[**INTMAX\_MIN**, **INTMAX\_MAX**\].

  The macro **INTMAX\_C**() expands its argument to an integer constant of type *intmax\_t*.

  The length modifier for *intmax\_t* for the [**printf**(3)](/printf/3.md) and the [**scanf**(3)](/scanf/3.md) families of functions is **j**; resulting commonly in **%jd** or **%ji** for printing *intmax\_t* values.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *Bugs*: *intmax\_t* is not large enough to represent values of type *\_\_int128* in implementations where *\_\_int128* is defined and *long long* is less than 128 bits wide.

  *See also*: the *uintmax\_t* type in this page.

- *int*N*\_t*

  *Include*: *\<stdint.h\>*. Alternatively, *\<inttypes.h\>*.

  *int8\_t*, *int16\_t*, *int32\_t*, *int64\_t*

  A signed integer type of a fixed width of exactly N bits, N being the value specified in its type name. According to the C language standard, they shall be capable of storing values in the range \[**INT**N**\_MIN**, **INT**N**\_MAX**\], substituting N by the appropriate number.

  According to POSIX, *int8\_t*, *int16\_t*, and *int32\_t* are required; *int64\_t* is only required in implementations that provide integer types with width 64; and all other types of this form are optional.

  The length modifiers for the *int*N*\_t* types for the [**printf**(3)](/printf/3.md) family of functions are expanded by macros of the forms **PRId**N and **PRIi**N (defined in *\<inttypes.h\>*); resulting for example in **%"PRId64"** or **%"PRIi64"** for printing *int64\_t* values. The length modifiers for the *int*N*\_t* types for the [**scanf**(3)](/scanf/3.md) family of functions are expanded by macros of the forms **SCNd**N and **SCNi**N, (defined in *\<inttypes.h\>*); resulting for example in **%"SCNd8"** or **%"SCNi8"** for scanning *int8\_t* values.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: the *intmax\_t*, *uint*N*\_t*, and *uintmax\_t* types in this page.

- *intptr\_t*

  *Include*: *\<stdint.h\>*. Alternatively, *\<inttypes.h\>*.

  A signed integer type such that any valid (*void \**) value can be converted to this type and back. According to the C language standard, it shall be capable of storing values in the range \[**INTPTR\_MIN**, **INTPTR\_MAX**\].

  The length modifier for *intptr\_t* for the [**printf**(3)](/printf/3.md) family of functions is expanded by the macros **PRIdPTR** and **PRIiPTR** (defined in *\<inttypes.h\>*); resulting commonly in **%"PRIdPTR"** or **%"PRIiPTR"** for printing *intptr\_t* values. The length modifier for *intptr\_t* for the [**scanf**(3)](/scanf/3.md) family of functions is expanded by the macros **SCNdPTR** and **SCNiPTR,** (defined in *\<inttypes.h\>*); resulting commonly in **%"SCNdPTR"** or **%"SCNiPTR"** for scanning *intptr\_t* values.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: the *uintptr\_t* and *void \** types in this page.

- *lconv*

  *Include*: *\<locale.h\>*.

  ```
  struct lconv {                  /* Values in the "C" locale: */
      char   *decimal_point;      /* "." */
      char   *thousands_sep;      /* "" */
      char   *grouping;           /* "" */
      char   *mon_decimal_point;  /* "" */
      char   *mon_thousands_sep;  /* "" */
      char   *mon_grouping;       /* "" */
      char   *positive_sign;      /* "" */
      char   *negative_sign;      /* "" */
      char   *currency_symbol;    /* "" */
      char    frac_digits;        /* CHAR_MAX */
      char    p_cs_precedes;      /* CHAR_MAX */
      char    n_cs_precedes;      /* CHAR_MAX */
      char    p_sep_by_space;     /* CHAR_MAX */
      char    n_sep_by_space;     /* CHAR_MAX */
      char    p_sign_posn;        /* CHAR_MAX */
      char    n_sign_posn;        /* CHAR_MAX */
      char   *int_curr_symbol;    /* "" */
      char    int_frac_digits;    /* CHAR_MAX */
      char    int_p_cs_precedes;  /* CHAR_MAX */
      char    int_n_cs_precedes;  /* CHAR_MAX */
      char    int_p_sep_by_space; /* CHAR_MAX */
      char    int_n_sep_by_space; /* CHAR_MAX */
      char    int_p_sign_posn;    /* CHAR_MAX */
      char    int_n_sign_posn;    /* CHAR_MAX */
  };
  ```

  Contains members related to the formatting of numeric values. In the "C" locale, its members have the values shown in the comments above.

  *Conforming to*: C11 and later; POSIX.1-2001 and later.

  *See also*: [**setlocale**(3)](/setlocale/3.md), [**localeconv**(3)](/localeconv/3.md), **charsets**(5), [**locale**(7)](/locale/7.md)

- *ldiv\_t*

  *Include*: *\<stdlib.h\>*.

  ```
  typedef struct {
      long    quot; /* Quotient */
      long    rem;  /* Remainder */
  } ldiv_t;
  ```

  It is the type of the value returned by the [**ldiv**(3)](/ldiv/3.md) function.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**ldiv**(3)](/ldiv/3.md)

- *lldiv\_t*

  *Include*: *\<stdlib.h\>*.

  ```
  typedef struct {
      long long   quot; /* Quotient */
      long long   rem;  /* Remainder */
  } lldiv_t;
  ```

  It is the type of the value returned by the [**lldiv**(3)](/lldiv/3.md) function.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**lldiv**(3)](/lldiv/3.md)

- *off\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<aio.h\>*, *\<fcntl.h\>*, *\<stdio.h\>*, *\<sys/mman.h\>*, *\<sys/stat.h.h\>*, or *\<unistd.h\>*.

  Used for file sizes. According to POSIX, this shall be a signed integer type.

  *Versions*: *\<aio.h\>* and *\<stdio.h\>* define *off\_t* since POSIX.1-2008.

  *Conforming to*: POSIX.1-2001 and later.

  *Notes*: On some architectures, the width of this type can be controlled with the feature test macro **\_FILE\_OFFSET\_BITS**.

  *See also*: [**lseek**(2)](/lseek/2.md), [**mmap**(2)](/mmap/2.md), [**posix\_fadvise**(2)](/posix_fadvise/2.md), [**pread**(2)](/pread/2.md), [**truncate**(2)](/truncate/2.md), [**fseeko**(3)](/fseeko/3.md), [**lockf**(3)](/lockf/3.md), [**posix\_fallocate**(3)](/posix_fallocate/3.md), [**feature\_test\_macros**(7)](/feature_test_macros/7.md)

- *pid\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<fcntl.h\>*, *\<sched.h\>*, *\<signal.h\>*, *\<spawn.h\>*, *\<sys/msg.h\>*, *\<sys/sem.h\>*, *\<sys/shm.h\>*, *\<sys/wait.h\>*, *\<termios.h\>*, *\<time.h\>*, *\<unistd.h\>*, or *\<utmpx.h\>*.

  This type is used for storing process IDs, process group IDs, and session IDs. According to POSIX, it shall be a signed integer type, and the implementation shall support one or more programming environments where the width of *pid\_t* is no greater than the width of the type *long*.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**fork**(2)](/fork/2.md), [**getpid**(2)](/getpid/2.md), [**getppid**(2)](/getppid/2.md), [**getsid**(2)](/getsid/2.md), [**gettid**(2)](/gettid/2.md), [**getpgid**(2)](/getpgid/2.md), [**kill**(2)](/kill/2.md), [**pidfd\_open**(2)](/pidfd_open/2.md), [**sched\_setscheduler**(2)](/sched_setscheduler/2.md), [**waitpid**(2)](/waitpid/2.md), [**sigqueue**(3)](/sigqueue/3.md), [**credentials**(7)](/credentials/7.md),

- *ptrdiff\_t*

  *Include*: *\<stddef.h\>*.

  Used for a count of elements, and array indices. It is the result of subtracting two pointers. According to the C language standard, it shall be a signed integer type capable of storing values in the range \[**PTRDIFF\_MIN**, **PTRDIFF\_MAX**\].

  The length modifier for *ptrdiff\_t* for the [**printf**(3)](/printf/3.md) and the [**scanf**(3)](/scanf/3.md) families of functions is **t**; resulting commonly in **%td** or **%ti** for printing *ptrdiff\_t* values.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: the *size\_t* and *ssize\_t* types in this page.

- *regex\_t*

  *Include*: *\<regex.h\>*.

  ```
  typedef struct {
      size_t  re_nsub; /* Number of parenthesized subexpressions. */
  } regex_t;
  ```

  This is a structure type used in regular expression matching. It holds a compiled regular expression, compiled with [**regcomp**(3)](/regcomp/3.md).

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**regex**(3)](/regex/3.md)

- *regmatch\_t*

  *Include*: *\<regex.h\>*.

  ```
  typedef struct {
      regoff_t    rm_so; /* Byte offset from start of string
                            to start of substring */
      regoff_t    rm_eo; /* Byte offset from start of string of
                            the first character after the end of
                            substring */
  } regmatch_t;
  ```

  This is a structure type used in regular expression matching.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**regexec**(3)](/regexec/3.md)

- *regoff\_t*

  *Include*: *\<regex.h\>*.

  According to POSIX, it shall be a signed integer type capable of storing the largest value that can be stored in either a *ptrdiff\_t* type or a *ssize\_t* type.

  *Versions*: Prior to POSIX.1-2008, the type was capable of storing the largest value that can be stored in either an *off\_t* type or a *ssize\_t* type.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: the *regmatch\_t* structure and the *ptrdiff\_t* and *ssize\_t* types in this page.

- *sigevent*

  *Include*: *\<signal.h\>*. Alternatively, *\<aio.h\>*, *\<mqueue.h\>*, or *\<time.h\>*.

  ```
  struct sigevent {
      int             sigev_notify; /* Notification type */
      int             sigev_signo;  /* Signal number */
      union sigval    sigev_value;  /* Signal value */
      void          (*sigev_notify_function)(union sigval);
                                    /* Notification function */
      pthread_attr_t *sigev_notify_attributes;
                                    /* Notification attributes */
  };
  ```

  For further details about this type, see [**sigevent**(7)](/sigevent/7.md).

  *Versions*: *\<aio.h\>* and *\<time.h\>* define *sigevent* since POSIX.1-2008.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**timer\_create**(2)](/timer_create/2.md), [**getaddrinfo\_a**(3)](/getaddrinfo_a/3.md), [**lio\_listio**(3)](/lio_listio/3.md), [**mq\_notify**(3)](/mq_notify/3.md)

  See also the *aiocb* structure in this page.

- *siginfo\_t*

  *Include*: *\<signal.h\>*. Alternatively, *\<sys/wait.h\>*.

  ```
  typedef struct {
      int      si_signo;  /* Signal number */
      int      si_code;   /* Signal code */
      pid_t    si_pid;    /* Sending process ID */
      uid_t    si_uid;    /* Real user ID of sending process */
      void    *si_addr;   /* Address of faulting instruction */
      int      si_status; /* Exit value or signal */
      union sigval si_value;  /* Signal value */
  } siginfo_t;
  ```

  Information associated with a signal. For further details on this structure (including additional, Linux-specific fields), see [**sigaction**(2)](/sigaction/2.md).

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**pidfd\_send\_signal**(2)](/pidfd_send_signal/2.md), [**rt\_sigqueueinfo**(2)](/rt_sigqueueinfo/2.md), [**sigaction**(2)](/sigaction/2.md), [**sigwaitinfo**(2)](/sigwaitinfo/2.md), [**psiginfo**(3)](/psiginfo/3.md)

- *sigset\_t*

  *Include*: *\<signal.h\>*. Alternatively, *\<spawn.h\>*, or *\<sys/select.h\>*.

  This is a type that represents a set of signals. According to POSIX, this shall be an integer or structure type.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**epoll\_pwait**(2)](/epoll_pwait/2.md), [**ppoll**(2)](/ppoll/2.md), [**pselect**(2)](/pselect/2.md), [**sigaction**(2)](/sigaction/2.md), [**signalfd**(2)](/signalfd/2.md), [**sigpending**(2)](/sigpending/2.md), [**sigprocmask**(2)](/sigprocmask/2.md), [**sigsuspend**(2)](/sigsuspend/2.md), [**sigwaitinfo**(2)](/sigwaitinfo/2.md), [**signal**(7)](/signal/7.md)

- *sigval*

  *Include*: *\<signal.h\>*.

  ```
  union sigval {
      int     sigval_int; /* Integer value */
      void   *sigval_ptr; /* Pointer value */
  };
  ```

  Data passed with a signal.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**pthread\_sigqueue**(3)](/pthread_sigqueue/3.md), [**sigqueue**(3)](/sigqueue/3.md), [**sigevent**(7)](/sigevent/7.md)

  See also the *sigevent* structure and the *siginfo\_t* type in this page.

- *size\_t*

  *Include*: *\<stddef.h\>* or *\<sys/types.h\>*. Alternatively, *\<aio.h\>*, *\<glob.h\>*, *\<grp.h\>*, *\<iconv.h\>*, *\<monetary.h\>*, *\<mqueue.h\>*, *\<ndbm.h\>*, *\<pwd.h\>*, *\<regex.h\>*, *\<search.h\>*, *\<signal.h\>*, *\<stdio.h\>*, *\<stdlib.h\>*, *\<string.h\>*, *\<strings.h\>*, *\<sys/mman.h\>*, *\<sys/msg.h\>*, *\<sys/sem.h\>*, *\<sys/shm.h\>*, *\<sys/socket.h\>*, *\<sys/uio.h\>*, *\<time.h\>*, *\<unistd.h\>*, *\<wchar.h\>*, or *\<wordexp.h\>*.

  Used for a count of bytes.  It is the result of the *sizeof* operator. According to the C language standard, it shall be an unsigned integer type capable of storing values in the range \[0, **SIZE\_MAX**\]. According to POSIX, the implementation shall support one or more programming environments where the width of *size\_t* is no greater than the width of the type *long*.

  The length modifier for *size\_t* for the [**printf**(3)](/printf/3.md) and the [**scanf**(3)](/scanf/3.md) families of functions is **z**; resulting commonly in **%zu** or **%zx** for printing *size\_t* values.

  *Versions*: *\<aio.h\>*, *\<glob.h\>*, *\<grp.h\>*, *\<iconv.h\>*, *\<mqueue.h\>*, *\<pwd.h\>*, *\<signal.h\>*, and *\<sys/socket.h\>* define *size\_t* since POSIX.1-2008.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**read**(2)](/read/2.md), [**write**(2)](/write/2.md), [**fread**(3)](/fread/3.md), [**fwrite**(3)](/fwrite/3.md), [**memcmp**(3)](/memcmp/3.md), [**memcpy**(3)](/memcpy/3.md), [**memset**(3)](/memset/3.md), [**offsetof**(3)](/offsetof/3.md)

  See also the *ptrdiff\_t* and *ssize\_t* types in this page.

- *ssize\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<aio.h\>*, *\<monetary.h\>*, *\<mqueue.h\>*, *\<stdio.h\>*, *\<sys/msg.h\>*, *\<sys/socket.h\>*, *\<sys/uio.h\>*, or *\<unistd.h\>*.

  Used for a count of bytes or an error indication. According to POSIX, it shall be a signed integer type capable of storing values at least in the range \[-1, **SSIZE\_MAX**\], and the implementation shall support one or more programming environments where the width of *ssize\_t* is no greater than the width of the type *long*.

  Glibc and most other implementations provide a length modifier for *ssize\_t* for the [**printf**(3)](/printf/3.md) and the [**scanf**(3)](/scanf/3.md) families of functions, which is **z**; resulting commonly in **%zd** or **%zi** for printing *ssize\_t* values. Although **z** works for *ssize\_t* on most implementations, portable POSIX programs should avoid using it—for example, by converting the value to *intmax\_t* and using its length modifier (**j**).

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**read**(2)](/read/2.md), [**readlink**(2)](/readlink/2.md), [**readv**(2)](/readv/2.md), [**recv**(2)](/recv/2.md), [**send**(2)](/send/2.md), [**write**(2)](/write/2.md)

  See also the *ptrdiff\_t* and *size\_t* types in this page.

- *suseconds\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<sys/select.h\>*, or *\<sys/time.h\>*.

  Used for time in microseconds. According to POSIX, it shall be a signed integer type capable of storing values at least in the range \[-1, 1000000\], and the implementation shall support one or more programming environments where the width of *suseconds\_t* is no greater than the width of the type *long*.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: the *timeval* structure in this page.

- *time\_t*

  *Include*: *\<time.h\>* or *\<sys/types.h\>*. Alternatively, *\<sched.h\>*, *\<sys/msg.h\>*, *\<sys/select.h\>*, *\<sys/sem.h\>*, *\<sys/shm.h\>*, *\<sys/stat.h\>*, *\<sys/time.h\>*, or *\<utime.h\>*.

  Used for time in seconds. According to POSIX, it shall be an integer type.

  *Versions*: *\<sched.h\>* defines *time\_t* since POSIX.1-2008.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**stime**(2)](/stime/2.md), [**time**(2)](/time/2.md), [**ctime**(3)](/ctime/3.md), [**difftime**(3)](/difftime/3.md)

- *timer\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<time.h\>*.

  Used for timer ID returned by [**timer\_create**(2)](/timer_create/2.md). According to POSIX, there are no defined comparison or assignment operators for this type.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**timer\_create**(2)](/timer_create/2.md), [**timer\_delete**(2)](/timer_delete/2.md), [**timer\_getoverrun**(2)](/timer_getoverrun/2.md), [**timer\_settime**(2)](/timer_settime/2.md)

- *timespec*

  *Include*: *\<time.h\>*. Alternatively, *\<aio.h\>*, *\<mqueue.h\>*, *\<sched.h\>*, *\<signal.h\>*, *\<sys/select.h\>*, or *\<sys/stat.h\>*.

  ```
  struct timespec {
      time_t  tv_sec;  /* Seconds */
      long    tv_nsec; /* Nanoseconds */
  };
  ```

  Describes times in seconds and nanoseconds.

  *Conforming to*: C11 and later; POSIX.1-2001 and later.

  *See also*: [**clock\_gettime**(2)](/clock_gettime/2.md), [**clock\_nanosleep**(2)](/clock_nanosleep/2.md), [**nanosleep**(2)](/nanosleep/2.md), [**timerfd\_gettime**(2)](/timerfd_gettime/2.md), [**timer\_gettime**(2)](/timer_gettime/2.md)

- *timeval*

  *Include*: *\<sys/time.h\>*. Alternatively, *\<sys/resource.h\>*, *\<sys/select.h\>*, or *\<utmpx.h\>*.

  ```
  struct timeval {
      time_t      tv_sec;  /* Seconds */
      suseconds_t tv_usec; /* Microseconds */
  };
  ```

  Describes times in seconds and microseconds.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**gettimeofday**(2)](/gettimeofday/2.md), [**select**(2)](/select/2.md), [**utimes**(2)](/utimes/2.md), [**adjtime**(3)](/adjtime/3.md), [**futimes**(3)](/futimes/3.md), [**timeradd**(3)](/timeradd/3.md)

- *uid\_t*

  *Include*: *\<sys/types.h\>*. Alternatively, *\<pwd.h\>*, *\<signal.h\>*, *\<stropts.h\>*, *\<sys/ipc.h\>*, *\<sys/stat.h\>*, or *\<unistd.h\>*.

  A type used to hold user IDs. According to POSIX, this shall be an integer type.

  *Conforming to*: POSIX.1-2001 and later.

  *See also*: [**chown**(2)](/chown/2.md), [**getuid**(2)](/getuid/2.md), [**geteuid**(2)](/geteuid/2.md), [**getresuid**(2)](/getresuid/2.md), **getpwnam**(2), [**credentials**(7)](/credentials/7.md)

- *uintmax\_t*

  *Include*: *\<stdint.h\>*. Alternatively, *\<inttypes.h\>*.

  An unsigned integer type capable of representing any value of any unsigned integer type supported by the implementation. According to the C language standard, it shall be capable of storing values in the range \[0, **UINTMAX\_MAX**\].

  The macro **UINTMAX\_C**() expands its argument to an integer constant of type *uintmax\_t*.

  The length modifier for *uintmax\_t* for the [**printf**(3)](/printf/3.md) and the [**scanf**(3)](/scanf/3.md) families of functions is **j**; resulting commonly in **%ju** or **%jx** for printing *uintmax\_t* values.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *Bugs*: *uintmax\_t* is not large enough to represent values of type *unsigned \_\_int128* in implementations where *unsigned \_\_int128* is defined and *unsigned long long* is less than 128 bits wide.

  *See also*: the *intmax\_t* type in this page.

- *uint*N*\_t*

  *Include*: *\<stdint.h\>*. Alternatively, *\<inttypes.h\>*.

  *uint8\_t*, *uint16\_t*, *uint32\_t*, *uint64\_t*

  An unsigned integer type of a fixed width of exactly N bits, N being the value specified in its type name. According to the C language standard, they shall be capable of storing values in the range \[0, **UINT**N**\_MAX**\], substituting N by the appropriate number.

  According to POSIX, *uint8\_t*, *uint16\_t*, and *uint32\_t* are required; *uint64\_t* is only required in implementations that provide integer types with width 64; and all other types of this form are optional.

  The length modifiers for the *uint*N*\_t* types for the [**printf**(3)](/printf/3.md) family of functions are expanded by macros of the forms **PRIu**N, **PRIo**N, **PRIx**N, and **PRIX**N (defined in *\<inttypes.h\>*); resulting for example in **%"PRIu32"** or **%"PRIx32"** for printing *uint32\_t* values. The length modifiers for the *uint*N*\_t* types for the [**scanf**(3)](/scanf/3.md) family of functions are expanded by macros of the forms **SCNu**N, **SCNo**N, **SCNx**N, and **SCNX**N (defined in *\<inttypes.h\>*); resulting for example in **%"SCNu16"** or **%"SCNx16"** for scanning *uint16\_t* values.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: the *intmax\_t*, *int*N*\_t*, and *uintmax\_t* types in this page.

- *uintptr\_t*

  *Include*: *\<stdint.h\>*. Alternatively, *\<inttypes.h\>*.

  An unsigned integer type such that any valid (*void \**) value can be converted to this type and back. According to the C language standard, it shall be capable of storing values in the range \[0, **UINTPTR\_MAX**\].

  The length modifier for *uintptr\_t* for the [**printf**(3)](/printf/3.md) family of functions is expanded by the macros **PRIuPTR**, **PRIoPTR**, **PRIxPTR**, and **PRIXPTR** (defined in *\<inttypes.h\>*); resulting commonly in **%"PRIuPTR"** or **%"PRIxPTR"** for printing *uintptr\_t* values. The length modifier for *uintptr\_t* for the [**scanf**(3)](/scanf/3.md) family of functions is expanded by the macros **SCNuPTR,** **SCNoPTR,** **SCNxPTR**, and **SCNXPTR** (defined in *\<inttypes.h\>*); resulting commonly in **%"SCNuPTR"** or **%"SCNxPTR"** for scanning *uintptr\_t* values.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: the *intptr\_t* and *void \** types in this page.

- *va\_list*

  *Include*: *\<stdarg\>*. Alternatively, *\<stdio.h\>*, or *\<wchar.h\>*.

  Used by functions with a varying number of arguments of varying types. The function must declare an object of type *va\_list* which is used by the macros [**va\_start**(3)](/va_start/3.md), [**va\_arg**(3)](/va_arg/3.md), [**va\_copy**(3)](/va_copy/3.md), and [**va\_end**(3)](/va_end/3.md) to traverse the list of arguments.

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**va\_start**(3)](/va_start/3.md), [**va\_arg**(3)](/va_arg/3.md), [**va\_copy**(3)](/va_copy/3.md), [**va\_end**(3)](/va_end/3.md)

- *void \**

  According to the C language standard, a pointer to any object type may be converted to a pointer to *void* and back. POSIX further requires that any pointer, including pointers to functions, may be converted to a pointer to *void* and back.

  Conversions from and to any other pointer type are done implicitly, not requiring casts at all. Note that this feature prevents any kind of type checking: the programmer should be careful not to convert a *void \** value to a type incompatible to that of the underlying data, because that would result in undefined behavior.

  This type is useful in function parameters and return value to allow passing values of any type. The function will typically use some mechanism to know the real type of the data being passed via a pointer to *void*.

  A value of this type can't be dereferenced, as it would give a value of type *void*, which is not possible. Likewise, pointer arithmetic is not possible with this type. However, in GNU C, pointer arithmetic is allowed as an extension to the standard; this is done by treating the size of a *void* or of a function as 1. A consequence of this is that *sizeof* is also allowed on *void* and on function types, and returns 1.

  The conversion specifier for *void \** for the [**printf**(3)](/printf/3.md) and the [**scanf**(3)](/scanf/3.md) families of functions is **p**.

  *Versions*: The POSIX requirement about compatibility between *void \** and function pointers was added in POSIX.1-2008 Technical Corrigendum 1 (2013).

  *Conforming to*: C99 and later; POSIX.1-2001 and later.

  *See also*: [**malloc**(3)](/malloc/3.md), [**memcmp**(3)](/memcmp/3.md), [**memcpy**(3)](/memcpy/3.md), [**memset**(3)](/memset/3.md)

  See also the *intptr\_t* and *uintptr\_t* types in this page.

## NOTES

The structures described in this manual page shall contain, at least, the members shown in their definition, in no particular order.

Most of the integer types described in this page don't have a corresponding length modifier for the [**printf**(3)](/printf/3.md) and the [**scanf**(3)](/scanf/3.md) families of functions. To print a value of an integer type that doesn't have a length modifier, it should be converted to *intmax\_t* or *uintmax\_t* by an explicit cast. To scan into a variable of an integer type that doesn't have a length modifier, an intermediate temporary variable of type *intmax\_t* or *uintmax\_t* should be used. When copying from the temporary variable to the destination variable, the value could overflow. If the type has upper and lower limits, the user should check that the value is within those limits, before actually copying the value. The example below shows how these conversions should be done.

### Conventions used in this page

In "Conforming to" we only concern ourselves with C99 and later and POSIX.1-2001 and later. Some types may be specified in earlier versions of one of these standards, but in the interests of simplicity we omit details from earlier standards.

In "Include", we first note the "primary" header(s) that define the type according to either the C or POSIX.1 standards. Under "Alternatively", we note additional headers that the standards specify shall define the type.

## EXAMPLES

The program shown below scans from a string and prints a value stored in a variable of an integer type that doesn't have a length modifier. The appropriate conversions from and to *intmax\_t*, and the appropriate range checks, are used as explained in the notes section above.

```
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
int
main (void)
{
    static const char *const str = "500000 us in half a second";
    suseconds_t us;
    intmax_t    tmp;
    /* Scan the number from the string into the temporary variable */
    sscanf(str, "%jd", &tmp);
    /* Check that the value is within the valid range of suseconds_t */
    if (tmp < -1 || tmp > 1000000) {
        fprintf(stderr, "Scanned value outside valid range!\n");
        exit(EXIT_FAILURE);
    }
    /* Copy the value to the suseconds_t variable 'us' */
    us = tmp;
    /* Even though suseconds_t can hold the value -1, this isn't
       a sensible number of microseconds */
    if (us < 0) {
        fprintf(stderr, "Scanned value shouldn't be negative!\n");
        exit(EXIT_FAILURE);
    }
    /* Print the value */
    printf("There are %jd microseconds in half a second.\n",
            (intmax_t) us);
    exit(EXIT_SUCCESS);
}
```

## SEE ALSO

[**feature\_test\_macros**(7)](/feature_test_macros/7.md), [**standards**(7)](/standards/7.md)

## COLOPHON

This page is part of release 5.10 of the Linux *man-pages* project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
