{
    "content": [
        {
            "type": "text",
            "text": "# siginfo_t(3) (man)\n\n**Summary:** systemdatatypes - overview of system data types\n\n## Examples\n\n- `The program shown below scans from a string and prints a value stored in a variable of an in‐`\n- `teger type that doesn't have a length modifier.  The appropriate conversions from and to int‐`\n- `maxt, and the appropriate range checks, are used as explained in the notes section above.`\n- `#include <stdint.h>`\n- `#include <stdio.h>`\n- `#include <stdlib.h>`\n- `#include <sys/types.h>`\n- `int`\n- `main (void)`\n- `static const char *const str = \"500000 us in half a second\";`\n- `susecondst us;`\n- `intmaxt    tmp;`\n- `/* Scan the number from the string into the temporary variable */`\n- `sscanf(str, \"%jd\", &tmp);`\n- `/* Check that the value is within the valid range of susecondst */`\n- `if (tmp < -1 || tmp > 1000000) {`\n- `fprintf(stderr, \"Scanned value outside valid range!\\n\");`\n- `exit(EXITFAILURE);`\n- `/* Copy the value to the susecondst variable 'us' */`\n- `us = tmp;`\n- `/* Even though susecondst can hold the value -1, this isn't`\n- `a sensible number of microseconds */`\n- `if (us < 0) {`\n- `fprintf(stderr, \"Scanned value shouldn't be negative!\\n\");`\n- `exit(EXITFAILURE);`\n- `/* Print the value */`\n- `printf(\"There are %jd microseconds in half a second.\\n\",`\n- `(intmaxt) us);`\n- `exit(EXITSUCCESS);`\n\n## See Also\n\n- featuretestmacros(7)\n- standards(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (691 lines)\n- **NOTES** (13 lines) — 1 subsections\n  - Conventions used in this page (8 lines)\n- **EXAMPLES** (47 lines)\n- **SEE ALSO** (2 lines)\n- **COLOPHON** (7 lines)\n\n## Full Content\n\n### NAME\n\nsystemdatatypes - overview of system data types\n\n### DESCRIPTION\n\naiocb\nInclude: <aio.h>.\n\nstruct aiocb {\nint             aiofildes;    /* File descriptor */\nofft           aiooffset;    /* File offset */\nvolatile void  *aiobuf;       /* Location of buffer */\nsizet          aionbytes;    /* Length of transfer */\nint             aioreqprio;   /* Request priority offset */\nstruct sigevent aiosigevent;  /* Signal number and value */\nint             aiolioopcode;/* Operation to be performed */\n};\n\nFor further information about this structure, see aio(7).\n\nConforming to: POSIX.1-2001 and later.\n\nSee  also:  aiocancel(3),  aioerror(3),  aiofsync(3),  aioread(3),  aioreturn(3),\naiosuspend(3), aiowrite(3), liolistio(3)\n\nclockt\nInclude: <time.h> or <sys/types.h>.  Alternatively, <sys/time.h>.\n\nUsed for system time in clock ticks or CLOCKSPERSEC (defined in <time.h>).   Accord‐\ning to POSIX, it shall be an integer type or a real-floating type.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: times(2), clock(3)\n\nclockidt\nInclude: <sys/types.h>.  Alternatively, <time.h>.\n\nUsed for clock ID type in the clock and timer functions.  According to POSIX, it shall\nbe defined as an arithmetic type.\n\nConforming to: POSIX.1-2001 and later.\n\nSee  also:  clockadjtime(2),  clockgetres(2),  clocknanosleep(2),  timercreate(2),\nclockgetcpuclockid(3)\n\ndevt\nInclude: <sys/types.h>.  Alternatively, <sys/stat.h>.\n\nUsed  for  device  IDs.  According to POSIX, it shall be an integer type.  For further\ndetails of this type, see makedev(3).\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: mknod(2), stat(2)\n\ndivt\nInclude: <stdlib.h>.\n\ntypedef struct {\nint quot; /* Quotient */\nint rem;  /* Remainder */\n} divt;\n\nIt is the type of the value returned by the div(3) function.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: div(3)\n\ndoublet\nInclude: <math.h>.\n\nThe implementation's most efficient floating type at least as  wide  as  double.   Its\ntype depends on the value of the macro FLTEVALMETHOD (defined in <float.h>):\n\n0      doublet is double.\n\n1      doublet is double.\n\n2      doublet is long double.\n\nFor other values of FLTEVALMETHOD, the type of doublet is implementation-defined.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: the floatt type in this page.\n\nfdset\nInclude: <sys/select.h>.  Alternatively, <sys/time.h>.\n\nA  structure  type  that can represent a set of file descriptors.  According to POSIX,\nthe maximum number of file descriptors in an fdset structure  is  the  value  of  the\nmacro FDSETSIZE.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: select(2)\n\nfenvt\nInclude: <fenv.h>.\n\nThis  type  represents  the entire floating-point environment, including control modes\nand status flags; for further details, see fenv(3).\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: fenv(3)\n\nfexceptt\nInclude: <fenv.h>.\n\nThis type represents the floating-point status flags collectively; for further details\nsee fenv(3).\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: fenv(3)\n\nFILE\nInclude: <stdio.h>.  Alternatively, <wchar.h>.\n\nAn object type used for streams.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee   also:   fclose(3),  flockfile(3),  fopen(3),  fprintf(3),  fread(3),  fscanf(3),\nstdin(3), stdio(3)\n\nfloatt\nInclude: <math.h>.\n\nThe implementation's most efficient floating type at least as wide as float.  Its type\ndepends on the value of the macro FLTEVALMETHOD (defined in <float.h>):\n\n0      floatt is float.\n\n1      floatt is double.\n\n2      floatt is long double.\n\nFor other values of FLTEVALMETHOD, the type of floatt is implementation-defined.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: the doublet type in this page.\n\ngidt\nInclude:  <sys/types.h>.   Alternatively,  <grp.h>,  <pwd.h>, <signal.h>, <stropts.h>,\n<sys/ipc.h>, <sys/stat.h>, or <unistd.h>.\n\nA type used to hold group IDs.  According to POSIX, this shall be an integer type.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: chown(2), getgid(2), getegid(2),  getgroups(2),  getresgid(2),  getgrnam(2),\ncredentials(7)\n\nidt\nInclude: <sys/types.h>.  Alternatively, <sys/resource.h>.\n\nA  type used to hold a general identifier.  According to POSIX, this shall be an inte‐\nger type that can be used to contain a pidt, uidt, or gidt.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: getpriority(2), waitid(2)\n\nimaxdivt\nInclude: <inttypes.h>.\n\ntypedef struct {\nintmaxt    quot; /* Quotient */\nintmaxt    rem;  /* Remainder */\n} imaxdivt;\n\nIt is the type of the value returned by the imaxdiv(3) function.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: imaxdiv(3)\n\nintmaxt\nInclude: <stdint.h>.  Alternatively, <inttypes.h>.\n\nA signed integer type capable of representing any value of  any  signed  integer  type\nsupported  by  the  implementation.  According to the C language standard, it shall be\ncapable of storing values in the range [INTMAXMIN, INTMAXMAX].\n\nThe macro INTMAXC() expands its argument to an integer constant of type intmaxt.\n\nThe length modifier for intmaxt for the printf(3) and the scanf(3) families of  func‐\ntions is j; resulting commonly in %jd or %ji for printing intmaxt values.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nBugs: intmaxt is not large enough to represent values of type int128 in implementa‐\ntions where int128 is defined and long long is less than 128 bits wide.\n\nSee also: the uintmaxt type in this page.\n\nintNt\nInclude: <stdint.h>.  Alternatively, <inttypes.h>.\n\nint8t, int16t, int32t, int64t\n\nA signed integer type of a fixed width of exactly N bits, N being the value  specified\nin  its  type  name.   According  to the C language standard, they shall be capable of\nstoring values in the range [INTNMIN, INTNMAX], substituting N  by  the  appropriate\nnumber.\n\nAccording  to  POSIX,  int8t,  int16t, and int32t are required; int64t is only re‐\nquired in implementations that provide integer types with  width  64;  and  all  other\ntypes of this form are optional.\n\nThe  length  modifiers  for the intNt types for the printf(3) family of functions are\nexpanded by macros of the forms PRIdN and PRIiN (defined in  <inttypes.h>);  resulting\nfor  example  in %\"PRId64\" or %\"PRIi64\" for printing int64t values.  The length modi‐\nfiers for the intNt types for the scanf(3) family of functions are expanded by macros\nof  the  forms  SCNdN  and  SCNiN, (defined in <inttypes.h>); resulting for example in\n%\"SCNd8\" or %\"SCNi8\" for scanning int8t values.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: the intmaxt, uintNt, and uintmaxt types in this page.\n\nintptrt\nInclude: <stdint.h>.  Alternatively, <inttypes.h>.\n\nA signed integer type such that any valid (void *) value can be converted to this type\nand back.  According to the C language standard, it shall be capable of storing values\nin the range [INTPTRMIN, INTPTRMAX].\n\nThe length modifier for intptrt for the printf(3) family of functions is expanded  by\nthe  macros  PRIdPTR  and  PRIiPTR  (defined  in  <inttypes.h>); resulting commonly in\n%\"PRIdPTR\" or %\"PRIiPTR\" for  printing  intptrt  values.   The  length  modifier  for\nintptrt  for  the  scanf(3) family of functions is expanded by the macros SCNdPTR and\nSCNiPTR, (defined in <inttypes.h>); resulting commonly in %\"SCNdPTR\" or %\"SCNiPTR\" for\nscanning intptrt values.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: the uintptrt and void * types in this page.\n\nlconv\nInclude: <locale.h>.\n\nstruct lconv {                  /* Values in the \"C\" locale: */\nchar   *decimalpoint;      /* \".\" */\nchar   *thousandssep;      /* \"\" */\nchar   *grouping;           /* \"\" */\nchar   *mondecimalpoint;  /* \"\" */\nchar   *monthousandssep;  /* \"\" */\nchar   *mongrouping;       /* \"\" */\nchar   *positivesign;      /* \"\" */\nchar   *negativesign;      /* \"\" */\nchar   *currencysymbol;    /* \"\" */\nchar    fracdigits;        /* CHARMAX */\nchar    pcsprecedes;      /* CHARMAX */\nchar    ncsprecedes;      /* CHARMAX */\nchar    psepbyspace;     /* CHARMAX */\nchar    nsepbyspace;     /* CHARMAX */\nchar    psignposn;        /* CHARMAX */\nchar    nsignposn;        /* CHARMAX */\nchar   *intcurrsymbol;    /* \"\" */\nchar    intfracdigits;    /* CHARMAX */\nchar    intpcsprecedes;  /* CHARMAX */\nchar    intncsprecedes;  /* CHARMAX */\nchar    intpsepbyspace; /* CHARMAX */\nchar    intnsepbyspace; /* CHARMAX */\nchar    intpsignposn;    /* CHARMAX */\nchar    intnsignposn;    /* CHARMAX */\n};\n\nContains  members related to the formatting of numeric values.  In the \"C\" locale, its\nmembers have the values shown in the comments above.\n\nConforming to: C11 and later; POSIX.1-2001 and later.\n\nSee also: setlocale(3), localeconv(3), charsets(5), locale(7)\n\nldivt\nInclude: <stdlib.h>.\n\ntypedef struct {\nlong    quot; /* Quotient */\nlong    rem;  /* Remainder */\n} ldivt;\n\nIt is the type of the value returned by the ldiv(3) function.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: ldiv(3)\n\nlldivt\nInclude: <stdlib.h>.\n\ntypedef struct {\nlong long   quot; /* Quotient */\nlong long   rem;  /* Remainder */\n} lldivt;\n\nIt is the type of the value returned by the lldiv(3) function.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: lldiv(3)\n\nofft\nInclude: <sys/types.h>.  Alternatively, <aio.h>, <fcntl.h>,  <stdio.h>,  <sys/mman.h>,\n<sys/stat.h.h>, or <unistd.h>.\n\nUsed for file sizes.  According to POSIX, this shall be a signed integer type.\n\nVersions: <aio.h> and <stdio.h> define offt since POSIX.1-2008.\n\nConforming to: POSIX.1-2001 and later.\n\nNotes:  On  some architectures, the width of this type can be controlled with the fea‐\nture test macro FILEOFFSETBITS.\n\nSee also:  lseek(2),  mmap(2),  posixfadvise(2),  pread(2),  truncate(2),  fseeko(3),\nlockf(3), posixfallocate(3), featuretestmacros(7)\n\npidt\nInclude:  <sys/types.h>.   Alternatively, <fcntl.h>, <sched.h>, <signal.h>, <spawn.h>,\n<sys/msg.h>,   <sys/sem.h>,   <sys/shm.h>,   <sys/wait.h>,   <termios.h>,    <time.h>,\n<unistd.h>, or <utmpx.h>.\n\nThis  type  is  used for storing process IDs, process group IDs, and session IDs.  Ac‐\ncording to POSIX, it shall be a signed integer type, and the implementation shall sup‐\nport  one or more programming environments where the width of pidt is no greater than\nthe width of the type long.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: fork(2), getpid(2), getppid(2), getsid(2), gettid(2),  getpgid(2),  kill(2),\npidfdopen(2), schedsetscheduler(2), waitpid(2), sigqueue(3), credentials(7),\n\nptrdifft\nInclude: <stddef.h>.\n\nUsed  for a count of elements, and array indices.  It is the result of subtracting two\npointers.  According to the C language standard, it shall be a signed integer type ca‐\npable of storing values in the range [PTRDIFFMIN, PTRDIFFMAX].\n\nThe length modifier for ptrdifft for the printf(3) and the scanf(3) families of func‐\ntions is t; resulting commonly in %td or %ti for printing ptrdifft values.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: the sizet and ssizet types in this page.\n\nregext\nInclude: <regex.h>.\n\ntypedef struct {\nsizet  rensub; /* Number of parenthesized subexpressions. */\n} regext;\n\nThis is a structure type used in regular expression matching.   It  holds  a  compiled\nregular expression, compiled with regcomp(3).\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: regex(3)\n\nregmatcht\nInclude: <regex.h>.\n\ntypedef struct {\nregofft    rmso; /* Byte offset from start of string\nto start of substring */\nregofft    rmeo; /* Byte offset from start of string of\nthe first character after the end of\nsubstring */\n} regmatcht;\n\nThis is a structure type used in regular expression matching.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: regexec(3)\n\nregofft\nInclude: <regex.h>.\n\nAccording  to  POSIX, it shall be a signed integer type capable of storing the largest\nvalue that can be stored in either a ptrdifft type or a ssizet type.\n\nVersions: Prior to POSIX.1-2008, the type was capable of  storing  the  largest  value\nthat can be stored in either an offt type or a ssizet type.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: the regmatcht structure and the ptrdifft and ssizet types in this page.\n\nsigevent\nInclude: <signal.h>.  Alternatively, <aio.h>, <mqueue.h>, or <time.h>.\n\nstruct sigevent {\nint             sigevnotify; /* Notification type */\nint             sigevsigno;  /* Signal number */\nunion sigval    sigevvalue;  /* Signal value */\nvoid          (*sigevnotifyfunction)(union sigval);\n/* Notification function */\npthreadattrt *sigevnotifyattributes;\n/* Notification attributes */\n};\n\nFor further details about this type, see sigevent(7).\n\nVersions: <aio.h> and <time.h> define sigevent since POSIX.1-2008.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: timercreate(2), getaddrinfoa(3), liolistio(3), mqnotify(3)\n\nSee also the aiocb structure in this page.\n\nsiginfot\nInclude: <signal.h>.  Alternatively, <sys/wait.h>.\n\ntypedef struct {\nint      sisigno;  /* Signal number */\nint      sicode;   /* Signal code */\npidt    sipid;    /* Sending process ID */\nuidt    siuid;    /* Real user ID of sending process */\nvoid    *siaddr;   /* Address of faulting instruction */\nint      sistatus; /* Exit value or signal */\nunion sigval sivalue;  /* Signal value */\n} siginfot;\n\nInformation  associated with a signal.  For further details on this structure (includ‐\ning additional, Linux-specific fields), see sigaction(2).\n\nConforming to: POSIX.1-2001 and later.\n\nSee  also:  pidfdsendsignal(2),  rtsigqueueinfo(2),  sigaction(2),  sigwaitinfo(2),\npsiginfo(3)\n\nsigsett\nInclude: <signal.h>.  Alternatively, <spawn.h>, or <sys/select.h>.\n\nThis is a type that represents a set of signals.  According to POSIX, this shall be an\ninteger or structure type.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: epollpwait(2), ppoll(2), pselect(2),  sigaction(2),  signalfd(2),  sigpend‐‐\ning(2), sigprocmask(2), sigsuspend(2), sigwaitinfo(2), signal(7)\n\nsigval\nInclude: <signal.h>.\n\nunion sigval {\nint     sigvalint; /* Integer value */\nvoid   *sigvalptr; /* Pointer value */\n};\n\nData passed with a signal.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: pthreadsigqueue(3), sigqueue(3), sigevent(7)\n\nSee also the sigevent structure and the siginfot type in this page.\n\nsizet\nInclude:  <stddef.h>  or  <sys/types.h>.   Alternatively,  <aio.h>, <glob.h>, <grp.h>,\n<iconv.h>, <monetary.h>, <mqueue.h>, <ndbm.h>, <pwd.h>, <regex.h>,  <search.h>,  <sig‐\nnal.h>,  <stdio.h>,  <stdlib.h>,  <string.h>,  <strings.h>, <sys/mman.h>, <sys/msg.h>,\n<sys/sem.h>,   <sys/shm.h>,   <sys/socket.h>,   <sys/uio.h>,   <time.h>,   <unistd.h>,\n<wchar.h>, or <wordexp.h>.\n\nUsed for a count of bytes.  It is the result of the sizeof operator.  According to the\nC language standard, it shall be an unsigned integer type capable of storing values in\nthe  range [0, SIZEMAX].  According to POSIX, the implementation shall support one or\nmore programming environments where the width of sizet is no greater than  the  width\nof the type long.\n\nThe  length  modifier  for sizet for the printf(3) and the scanf(3) families of func‐\ntions is z; resulting commonly in %zu or %zx for printing sizet values.\n\nVersions: <aio.h>, <glob.h>, <grp.h>, <iconv.h>, <mqueue.h>, <pwd.h>, <signal.h>,  and\n<sys/socket.h> define sizet since POSIX.1-2008.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee  also:  read(2),  write(2),  fread(3), fwrite(3), memcmp(3), memcpy(3), memset(3),\noffsetof(3)\n\nSee also the ptrdifft and ssizet types in this page.\n\nssizet\nInclude: <sys/types.h>.  Alternatively, <aio.h>, <monetary.h>, <mqueue.h>,  <stdio.h>,\n<sys/msg.h>, <sys/socket.h>, <sys/uio.h>, or <unistd.h>.\n\nUsed  for  a count of bytes or an error indication.  According to POSIX, it shall be a\nsigned integer type capable of storing values at least in the range  [-1,  SSIZEMAX],\nand  the  implementation  shall support one or more programming environments where the\nwidth of ssizet is no greater than the width of the type long.\n\nGlibc and most other implementations provide a length modifier  for  ssizet  for  the\nprintf(3)  and  the  scanf(3) families of functions, which is z; resulting commonly in\n%zd or %zi for printing ssizet values.  Although z works for ssizet on  most  imple‐\nmentations,  portable  POSIX programs should avoid using it—for example, by converting\nthe value to intmaxt and using its length modifier (j).\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: read(2), readlink(2), readv(2), recv(2), send(2), write(2)\n\nSee also the ptrdifft and sizet types in this page.\n\nsusecondst\nInclude: <sys/types.h>.  Alternatively, <sys/select.h>, or <sys/time.h>.\n\nUsed for time in microseconds.  According to POSIX, it shall be a signed integer  type\ncapable  of storing values at least in the range [-1, 1000000], and the implementation\nshall support one or more programming environments where the width of  susecondst  is\nno greater than the width of the type long.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: the timeval structure in this page.\n\ntimet\nInclude:  <time.h>  or <sys/types.h>.  Alternatively, <sched.h>, <sys/msg.h>, <sys/se‐\nlect.h>, <sys/sem.h>, <sys/shm.h>, <sys/stat.h>, <sys/time.h>, or <utime.h>.\n\nUsed for time in seconds.  According to POSIX, it shall be an integer type.\n\nVersions: <sched.h> defines timet since POSIX.1-2008.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: stime(2), time(2), ctime(3), difftime(3)\n\ntimert\nInclude: <sys/types.h>.  Alternatively, <time.h>.\n\nUsed for timer ID returned by timercreate(2).  According to POSIX, there are  no  de‐\nfined comparison or assignment operators for this type.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: timercreate(2), timerdelete(2), timergetoverrun(2), timersettime(2)\n\ntimespec\nInclude:   <time.h>.    Alternatively,  <aio.h>,  <mqueue.h>,  <sched.h>,  <signal.h>,\n<sys/select.h>, or <sys/stat.h>.\n\nstruct timespec {\ntimet  tvsec;  /* Seconds */\nlong    tvnsec; /* Nanoseconds */\n};\n\nDescribes times in seconds and nanoseconds.\n\nConforming to: C11 and later; POSIX.1-2001 and later.\n\nSee  also:  clockgettime(2),  clocknanosleep(2),  nanosleep(2),  timerfdgettime(2),\ntimergettime(2)\n\ntimeval\nInclude: <sys/time.h>.  Alternatively, <sys/resource.h>, <sys/select.h>, or <utmpx.h>.\n\nstruct timeval {\ntimet      tvsec;  /* Seconds */\nsusecondst tvusec; /* Microseconds */\n};\n\nDescribes times in seconds and microseconds.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: gettimeofday(2), select(2), utimes(2), adjtime(3), futimes(3), timeradd(3)\n\nuidt\nInclude: <sys/types.h>.  Alternatively, <pwd.h>, <signal.h>, <stropts.h>, <sys/ipc.h>,\n<sys/stat.h>, or <unistd.h>.\n\nA type used to hold user IDs.  According to POSIX, this shall be an integer type.\n\nConforming to: POSIX.1-2001 and later.\n\nSee also: chown(2), getuid(2), geteuid(2), getresuid(2), getpwnam(2), credentials(7)\n\nuintmaxt\nInclude: <stdint.h>.  Alternatively, <inttypes.h>.\n\nAn unsigned integer type capable of representing any value  of  any  unsigned  integer\ntype  supported by the implementation.  According to the C language standard, it shall\nbe capable of storing values in the range [0, UINTMAXMAX].\n\nThe macro UINTMAXC() expands its argument to an integer constant of type uintmaxt.\n\nThe length modifier for uintmaxt for the printf(3) and the scanf(3) families of func‐\ntions is j; resulting commonly in %ju or %jx for printing uintmaxt values.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nBugs:  uintmaxt  is not large enough to represent values of type unsigned int128 in\nimplementations where unsigned int128 is defined and unsigned long long is less than\n128 bits wide.\n\nSee also: the intmaxt type in this page.\n\nuintNt\nInclude: <stdint.h>.  Alternatively, <inttypes.h>.\n\nuint8t, uint16t, uint32t, uint64t\n\nAn  unsigned integer type of a fixed width of exactly N bits, N being the value speci‐\nfied in its type name.  According to the C language standard, they shall be capable of\nstoring values in the range [0, UINTNMAX], substituting N by the appropriate number.\n\nAccording to POSIX, uint8t, uint16t, and uint32t are required; uint64t is only re‐\nquired in implementations that provide integer types with  width  64;  and  all  other\ntypes of this form are optional.\n\nThe  length  modifiers for the uintNt types for the printf(3) family of functions are\nexpanded by macros of the forms PRIuN, PRIoN,  PRIxN,  and  PRIXN  (defined  in  <int‐\ntypes.h>);  resulting for example in %\"PRIu32\" or %\"PRIx32\" for printing uint32t val‐\nues.  The length modifiers for the uintNt types for the scanf(3) family of  functions\nare  expanded  by macros of the forms SCNuN, SCNoN, SCNxN, and SCNXN (defined in <int‐\ntypes.h>); resulting for example in %\"SCNu16\" or %\"SCNx16\" for scanning uint16t  val‐\nues.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: the intmaxt, intNt, and uintmaxt types in this page.\n\nuintptrt\nInclude: <stdint.h>.  Alternatively, <inttypes.h>.\n\nAn  unsigned  integer type such that any valid (void *) value can be converted to this\ntype and back.  According to the C language standard, it shall be capable  of  storing\nvalues in the range [0, UINTPTRMAX].\n\nThe length modifier for uintptrt for the printf(3) family of functions is expanded by\nthe macros PRIuPTR, PRIoPTR, PRIxPTR, and PRIXPTR (defined in <inttypes.h>); resulting\ncommonly  in %\"PRIuPTR\" or %\"PRIxPTR\" for printing uintptrt values.  The length modi‐\nfier for uintptrt for the scanf(3) family of functions is expanded by the macros  SC‐‐\nNuPTR,  SCNoPTR, SCNxPTR, and SCNXPTR (defined in <inttypes.h>); resulting commonly in\n%\"SCNuPTR\" or %\"SCNxPTR\" for scanning uintptrt values.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: the intptrt and void * types in this page.\n\nvalist\nInclude: <stdarg>.  Alternatively, <stdio.h>, or <wchar.h>.\n\nUsed by functions with a varying number of arguments of varying types.   The  function\nmust  declare  an  object  of  type  valist  which is used by the macros vastart(3),\nvaarg(3), vacopy(3), and vaend(3) to traverse the list of arguments.\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: vastart(3), vaarg(3), vacopy(3), vaend(3)\n\nvoid *\nAccording to the C language standard, a pointer to any object type may be converted to\na pointer to void and back.  POSIX further requires that any pointer, including point‐\ners to functions, may be converted to a pointer to void and back.\n\nConversions from and to any other pointer type  are  done  implicitly,  not  requiring\ncasts at all.  Note that this feature prevents any kind of type checking: the program‐\nmer should be careful not to convert a void * value to a type incompatible to that  of\nthe underlying data, because that would result in undefined behavior.\n\nThis type is useful in function parameters and return value to allow passing values of\nany type.  The function will typically use some mechanism to know the real type of the\ndata being passed via a pointer to void.\n\nA  value  of  this  type can't be dereferenced, as it would give a value of type void,\nwhich is not possible.  Likewise, pointer arithmetic is not possible with  this  type.\nHowever, in GNU C, pointer arithmetic is allowed as an extension to the standard; this\nis done by treating the size of a void or of a function as 1.  A consequence  of  this\nis that sizeof is also allowed on void and on function types, and returns 1.\n\nThe  conversion  specifier  for  void * for the printf(3) and the scanf(3) families of\nfunctions is p.\n\nVersions: The POSIX requirement about compatibility between void * and function point‐\ners was added in POSIX.1-2008 Technical Corrigendum 1 (2013).\n\nConforming to: C99 and later; POSIX.1-2001 and later.\n\nSee also: malloc(3), memcmp(3), memcpy(3), memset(3)\n\nSee also the intptrt and uintptrt types in this page.\n\n### NOTES\n\nThe  structures  described  in this manual page shall contain, at least, the members shown in\ntheir definition, in no particular order.\n\nMost of the integer types described in this page don't have a corresponding  length  modifier\nfor  the  printf(3)  and  the scanf(3) families of functions.  To print a value of an integer\ntype that doesn't have a length modifier, it should be converted to intmaxt or uintmaxt  by\nan explicit cast.  To scan into a variable of an integer type that doesn't have a length mod‐\nifier, an intermediate temporary variable of type intmaxt or uintmaxt should be used.  When\ncopying  from  the  temporary variable to the destination variable, the value could overflow.\nIf the type has upper and lower limits, the user should check that the value is within  those\nlimits,  before  actually  copying  the value.  The example below shows how these conversions\nshould be done.\n\n#### Conventions used in this page\n\nIn \"Conforming to\" we only concern ourselves with C99 and later and POSIX.1-2001  and  later.\nSome  types may be specified in earlier versions of one of these standards, but in the inter‐\nests of simplicity we omit details from earlier standards.\n\nIn \"Include\", we first note the \"primary\" header(s) that define the type according to  either\nthe C or POSIX.1 standards.  Under \"Alternatively\", we note additional headers that the stan‐\ndards specify shall define the type.\n\n### EXAMPLES\n\nThe program shown below scans from a string and prints a value stored in a variable of an in‐\nteger type that doesn't have a length modifier.  The appropriate conversions from and to int‐\nmaxt, and the appropriate range checks, are used as explained in the notes section above.\n\n#include <stdint.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/types.h>\n\nint\nmain (void)\n{\nstatic const char *const str = \"500000 us in half a second\";\nsusecondst us;\nintmaxt    tmp;\n\n/* Scan the number from the string into the temporary variable */\n\nsscanf(str, \"%jd\", &tmp);\n\n/* Check that the value is within the valid range of susecondst */\n\nif (tmp < -1 || tmp > 1000000) {\nfprintf(stderr, \"Scanned value outside valid range!\\n\");\nexit(EXITFAILURE);\n}\n\n/* Copy the value to the susecondst variable 'us' */\n\nus = tmp;\n\n/* Even though susecondst can hold the value -1, this isn't\na sensible number of microseconds */\n\nif (us < 0) {\nfprintf(stderr, \"Scanned value shouldn't be negative!\\n\");\nexit(EXITFAILURE);\n}\n\n/* Print the value */\n\nprintf(\"There are %jd microseconds in half a second.\\n\",\n(intmaxt) us);\n\nexit(EXITSUCCESS);\n}\n\n### SEE ALSO\n\nfeaturetestmacros(7), standards(7)\n\n### COLOPHON\n\nThis page is part of release 5.10 of the Linux  man-pages  project.   A  description  of  the\nproject,  information about reporting bugs, and the latest version of this page, can be found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-12-21                         SYSTEMDATATYPES(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "siginfo_t",
        "section": "3",
        "mode": "man",
        "summary": "systemdatatypes - overview of system data types",
        "synopsis": null,
        "flags": [],
        "examples": [
            "The program shown below scans from a string and prints a value stored in a variable of an in‐",
            "teger type that doesn't have a length modifier.  The appropriate conversions from and to int‐",
            "maxt, 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\";",
            "susecondst us;",
            "intmaxt    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 susecondst */",
            "if (tmp < -1 || tmp > 1000000) {",
            "fprintf(stderr, \"Scanned value outside valid range!\\n\");",
            "exit(EXITFAILURE);",
            "/* Copy the value to the susecondst variable 'us' */",
            "us = tmp;",
            "/* Even though susecondst 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(EXITFAILURE);",
            "/* Print the value */",
            "printf(\"There are %jd microseconds in half a second.\\n\",",
            "(intmaxt) us);",
            "exit(EXITSUCCESS);"
        ],
        "see_also": [
            {
                "name": "featuretestmacros",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/featuretestmacros/7/json"
            },
            {
                "name": "standards",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/standards/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 691,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 13,
                "subsections": [
                    {
                        "name": "Conventions used in this page",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 47,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COLOPHON",
                "lines": 7,
                "subsections": []
            }
        ]
    }
}