Various patches to system_data_types(7)
cover Various patches to system_data_types(7)
Hey Branden,
This RFC is mostly directed to you.
The changes are:
- Add a few types:
- struct stat
- useconds_t
- Slightly related changes:
- Remove a note in usleep(3)
- Use -struct suffix for struct pages (and -union likewise)
- Move some types to separate pages (of course the intention is to do it with all of them, but that's slow).
The page already got too big, so I'm breaking it into smaller chunks.
- Add related macros to some pages (_WIDTH, _MAX, _MIN, _C(), ...).
If you have some time, could you please have a look at it?
I don't intend to take a lot of time from you, which this might, just some general opinion, and possibly if you differ with me in things like using \f, I'd like to know.
Thanks,
Alex
---
Alejandro Colomar (37):
stat.2, system_data_types.7: Document 'struct stat' in
system_data_types(7)
stat-struct.3: New link to system_data_types(7) aiocb-struct.3, lconv-struct.3, sigevent-struct.3, sigval-union.3,
sockaddr-struct.3, timespec-struct.3, timeval-struct.3: Rename some links to system_data_types.7 to add -{struct,union} suffix
system_data_types.7: Link to the stat structure definition system_data_types.7: ssize_t: Note that some headers only provide the
type since POSIX.1-2008
system_data_types.7: Document useconds_t
useconds_t.3: New link to system_data_types(7)
usleep.3: Remove incorrect portability note
aiocb-struct.3, system_data_types.7: Move text to a separate page
blkcnt_t.3, system_data_types.7: Move text to a separate page
blksize_t.3, system_data_types.7: Move text to a separate page
cc_t.3, system_data_types.7: Move text to a separate page
clock_t.3, system_data_types.7: Move text to a separate page
clockid_t.3, system_data_types.7: Move text to a separate page
dev_t.3, system_data_types.7: Move text to a separate page
div_t.3, system_data_types.7: Move text to a separate page
double_t.3, system_data_types.7: Move text to a separate page
double_t.3, float_t.3, system_data_types.7: Move float_t to double_t.3
select.2, system_data_types.7: Move fd_set to select.2
fenv_t.3, system_data_types.7: Move text to a separate page
fenv_t.3, system_data_types.7: Move fexcept_t to fenv_t.3
FILE.3, system_data_types.7: Move text to a separate page
id_t.3, system_data_types.7: Move text to a separate page
gid_t.3, id_t.3, system_data_types.7: Move gid_t to id_t.3
id_t.3, pid_t.3, system_data_types.7: Move pid_t to id_t.3
id_t.3, uid_t.3, system_data_types.7: Move uid_t to id_t.3
div_t.3, imaxdiv_t.3, system_data_types.7: Move imaxdiv_t to div_t.3
intmax_t.3, system_data_types.7: Move text to a separate page
intmax_t.3, uintmax_t.3, system_data_types.7: Move uintmax_t to
intmax_t.3 intmax_t.3: Document the [U]INTMAX_* macros
intN_t.3, system_data_types.7: Move text to a separate page intN_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uint8_t.3, uintN_t.3,
system_data_types.7: Move uintN_t to intN_t.3
intN_t.3: Document the [U]INTN_* macros
lconv-struct.3, system_data_types.7: Move text to a separate page div_t.3, ldiv_t.3, system_data_types.7: Move ldiv_t to div_t.3 div_t.3, lldiv_t.3, system_data_types.7: Move lldiv_t to div_t.3 mode_t.3, system_data_types.7: Move text to a separate page
man2/select.2 | 20 +-
man2/stat.2 | 143 +---
man3/FILE.3 | 26 +-
man3/aiocb-struct.3 | 31 +
man3/blkcnt_t.3 | 21 +-
man3/blksize_t.3 | 21 +-
man3/cc_t.3 | 18 +-
man3/clock_t.3 | 27 +-
man3/clockid_t.3 | 25 +-
man3/dev_t.3 | 24 +-
man3/div_t.3 | 47 +-
man3/double_t.3 | 45 +-
man3/fenv_t.3 | 25 +-
man3/fexcept_t.3 | 2 +-
man3/float_t.3 | 2 +-
man3/gid_t.3 | 2 +-
man3/id_t.3 | 108 ++-
man3/imaxdiv_t.3 | 2 +-
man3/int16_t.3 | 2 +-
man3/int32_t.3 | 2 +-
man3/int64_t.3 | 2 +-
man3/int8_t.3 | 2 +-
man3/intN_t.3 | 160 +++-
man3/intmax_t.3 | 88 +-
man3/lconv-struct.3 | 45 +
man3/ldiv_t.3 | 2 +-
man3/lldiv_t.3 | 2 +-
man3/mode_t.3 | 32 +-
man3/pid_t.3 | 2 +-
man3/{aiocb.3 => sigevent-struct.3} | 0
man3/{lconv.3 => sigval-union.3} | 0
man3/{sigval.3 => sockaddr-struct.3} | 0
man3/{sockaddr.3 => stat-struct.3} | 0
man3/{timespec.3 => timespec-struct.3} | 0
man3/{timeval.3 => timeval-struct.3} | 0
man3/uid_t.3 | 2 +-
man3/uint16_t.3 | 2 +-
man3/uint32_t.3 | 2 +-
man3/uint64_t.3 | 2 +-
man3/uint8_t.3 | 2 +-
man3/uintN_t.3 | 2 +-
man3/uintmax_t.3 | 2 +-
man3/useconds_t.3 | 1 +
man3/usleep.3 | 19 +-
man7/system_data_types.7 | 1076 ++++--------------------
45 files changed, 956 insertions(+), 1082 deletions(-)
create mode 100644 man3/aiocb-struct.3
create mode 100644 man3/lconv-struct.3
rename man3/{aiocb.3 => sigevent-struct.3} (100%)
rename man3/{lconv.3 => sigval-union.3} (100%)
rename man3/{sigval.3 => sockaddr-struct.3} (100%)
rename man3/{sockaddr.3 => stat-struct.3} (100%)
rename man3/{timespec.3 => timespec-struct.3} (100%)
rename man3/{timeval.3 => timeval-struct.3} (100%)
create mode 100644 man3/useconds_t.3Signature · 1 line
2.33.1
RFC 1/37 stat.2, system_data_types.7: Document 'struct stat' in system_data_types(7)
Move the definition of the struct present in stat(2), and put there a reference to stat-struct(3) instead.
--- man2/stat.2 | 143 +-------------------------------------- man7/system_data_types.7 | 141 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 140 deletions(-)
man2/stat.2 +3 -140
@@ -116,47 +116,8 @@ is specified by the file descriptor .SS The stat structure All of these system calls return a .I stat -structure, which contains the following fields: -.PP -.in +4n -.EX -struct stat { - dev_t st_dev; /* ID of device containing file */ - ino_t st_ino; /* Inode number */ - mode_t st_mode; /* File type and mode */ - nlink_t st_nlink; /* Number of hard links */ - uid_t st_uid; /* User ID of owner */ - gid_t st_gid; /* Group ID of owner */ - dev_t st_rdev; /* Device ID (if special file) */ - off_t st_size; /* Total size, in bytes */ - blksize_t st_blksize; /* Block size for filesystem I/O */ - blkcnt_t st_blocks; /* Number of 512B blocks allocated */ - - /* Since Linux 2.6, the kernel supports nanosecond - precision for the following timestamp fields. - For the details before Linux 2.6, see NOTES. */ - - struct timespec st_atim; /* Time of last access */ - struct timespec st_mtim; /* Time of last modification */ - struct timespec st_ctim; /* Time of last status change */ - -#define st_atime st_atim.tv_sec /* Backward compatibility */ -#define st_mtime st_mtim.tv_sec -#define st_ctime st_ctim.tv_sec -}; -.EE -.in -.PP -.IR Note : -the order of fields in the -.I stat -structure varies somewhat -across architectures. -In addition, -the definition above does not show the padding bytes -that may be present between some fields on various architectures. -Consult the glibc and kernel source code -if you need to know the details. +structure (see +.BR stat-struct (3)). .PP .\" Background: inode attributes are modified with i_mutex held, but .\" read by stat() without taking the mutex.
@@ -182,69 +143,6 @@ or the old .I st_uid together with the new .IR st_mode . -.PP -The fields in the -.I stat -structure are as follows: -.TP -.I st_dev -This field describes the device on which this file resides. -(The -.BR major (3) -and -.BR minor (3) -macros may be useful to decompose the device ID in this field.) -.TP -.I st_ino -This field contains the file's inode number. -.TP -.I st_mode -This field contains the file type and mode. -See -.BR inode (7) -for further information. -.TP -.I st_nlink -This field contains the number of hard links to the file. -.TP -.I st_uid -This field contains the user ID of the owner of the file. -.TP -.I st_gid -This field contains the ID of the group owner of the file. -.TP -.I st_rdev -This field describes the device that this file (inode) represents. -.TP -.I st_size -This field gives the size of the file (if it is a regular -file or a symbolic link) in bytes. -The size of a symbolic link is the length of the pathname -it contains, without a terminating null byte. -.TP -.I st_blksize -This field gives the "preferred" block size for efficient filesystem I/O. -.TP -.I st_blocks -This field indicates the number of blocks allocated to the file, -in 512-byte units. -(This may be smaller than -.IR st_size /512 -when the file has holes.) -.TP -.I st_atime -This is the time of the last access of file data. -.TP -.I st_mtime -This is the time of last modification of file data. -.TP -.I st_ctime -This is the file's last status change timestamp -(time of last change to the inode). -.PP -For further information on the above fields, see -.BR inode (7). -.\" .SS fstatat() The .BR fstatat ()
@@ -494,42 +392,6 @@ fields may be less portable. The interpretation differs between systems, and possibly on a single system when NFS mounts are involved.) .SH NOTES -.SS Timestamp fields -Older kernels and older standards did not support nanosecond timestamp -fields. -Instead, there were three timestamp -.RI fields\(em st_atime , -.IR st_mtime , -and -.IR st_ctime \(emtyped -as -.IR time_t -that recorded timestamps with one-second precision. -.PP -Since kernel 2.5.48, the -.I stat -structure supports nanosecond resolution for the three file timestamp fields. -The nanosecond components of each timestamp are available -via names of the form -.IR st_atim.tv_nsec , -if suitable feature test macros are defined. -Nanosecond timestamps were standardized in POSIX.1-2008, -and, starting with version 2.12, -glibc exposes the nanosecond component names if -.BR _POSIX_C_SOURCE -is defined with the value 200809L or greater, or -.BR _XOPEN_SOURCE -is defined with the value 700 or greater. -Up to and including glibc 2.19, -the definitions of the nanoseconds components are also defined if -.B _BSD_SOURCE -or -.B _SVID_SOURCE -is defined. -If none of the aforementioned macros are defined, -then the nanosecond values are exposed with names of the form -.IR st_atimensec . -.\" .SS C library/kernel differences Over time, increases in the size of the .I stat
@@ -710,6 +572,7 @@ main(int argc, char *argv[]) .BR readlink (2), .BR statx (2), .BR utime (2), +.BR stat-struct (3), .BR capabilities (7), .BR inode (7), .BR symlink (7)
man7/system_data_types.7 +141 -0
147 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 2/37 stat-struct.3: New link to system_data_types(7)
In reply to Alejandro Colomar--- man3/stat-struct.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/stat-struct.3
man3/stat-struct.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
Signature · 1 line
2.33.1
RFC 3/37 aiocb-struct.3, lconv-struct.3, sigevent-struct.3, sigval-union.3, sockaddr-struct.3, timespec-struct.3, timeval-struct.3: Rename some links to system_data_types.7 to add -{struct,union} suffix
In reply to Alejandro ColomarThis avoids shadowing other pages, and clearly differentiates function pages from type pages (both are in man3).
Do this for struct/union types, and not for typedefs. This makes sense because typedefs in C are in the same namespace as function identifiers, but struct and union (and enum) tags are in a different one, and can have the same name as a function.
---
man3/{aiocb.3 => aiocb-struct.3} | 0
man3/{lconv.3 => lconv-struct.3} | 0
man3/{sigval.3 => sigevent-struct.3} | 0
man3/{sockaddr.3 => sigval-union.3} | 0
man3/{timespec.3 => sockaddr-struct.3} | 0
man3/{timeval.3 => timespec-struct.3} | 0
man3/timeval-struct.3 | 1 +
7 files changed, 1 insertion(+)
rename man3/{aiocb.3 => aiocb-struct.3} (100%)
rename man3/{lconv.3 => lconv-struct.3} (100%)
rename man3/{sigval.3 => sigevent-struct.3} (100%)
rename man3/{sockaddr.3 => sigval-union.3} (100%)
rename man3/{timespec.3 => sockaddr-struct.3} (100%)
rename man3/{timeval.3 => timespec-struct.3} (100%)
create mode 100644 man3/timeval-struct.3man3/aiocb-struct.3 renamed from man3/aiocb.3 +0 -0
man3/lconv-struct.3 renamed from man3/lconv.3 +0 -0
man3/sigevent-struct.3 renamed from man3/sigval.3 +0 -0
man3/sigval-union.3 renamed from man3/sockaddr.3 +0 -0
man3/sockaddr-struct.3 renamed from man3/timespec.3 +0 -0
man3/timespec-struct.3 renamed from man3/timeval.3 +0 -0
man3/timeval-struct.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
Signature · 1 line
2.33.1
RFC 4/37 system_data_types.7: Link to the stat structure definition
In reply to Alejandro ColomarThe definition of 'struct stat' is not in stat(2) anymore. It is in the same system_data_types(7) page, so link to it.
--- man7/system_data_types.7 | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
man7/system_data_types.7 +17 -5
@@ -102,7 +102,9 @@ it shall be a signed integer type. POSIX.1-2001 and later. .PP .IR "See also" : -.BR stat (2) +the +.I stat +structure in this page. .RE .\"------------------------------------- blksize_t --------------------/ .TP
@@ -121,7 +123,9 @@ it shall be a signed integer type. POSIX.1-2001 and later. .PP .IR "See also" : -.BR stat (2) +the +.I stat +structure in this page. .RE .\"------------------------------------- cc_t -------------------------/ .TP
@@ -207,8 +211,12 @@ For further details of this type, see POSIX.1-2001 and later. .PP .IR "See also" : -.BR mknod (2), -.BR stat (2) +.BR mknod (2) +.PP +.IR "See also" : +the +.I stat +structure in this page. .RE .\"------------------------------------- div_t ------------------------/ .TP
@@ -807,8 +815,12 @@ POSIX.1-2001 and later. .BR chmod (2), .BR mkdir (2), .BR open (2), -.BR stat (2), .BR umask (2) +.PP +.IR "See also" : +the +.I stat +structure in this page. .RE .\"------------------------------------- off64_t ----------------------/ .TP
Signature · 1 line
2.33.1
RFC 5/37 system_data_types.7: ssize_t: Note that some headers only provide the type since POSIX.1-2008
In reply to Alejandro ColomarFrom: Alejandro Colomar <[email protected]>
--- man7/system_data_types.7 | 9 +++++++++ 1 file changed, 9 insertions(+)
man7/system_data_types.7 +9 -0
@@ -1429,6 +1429,15 @@ by converting the value to and using its length modifier .RB ( j ). .PP +.IR Versions : +.IR <aio.h> , +.IR <mqueue.h> , +and +.I <sys/socket.h> +define +.I size_t +since POSIX.1-2008. +.PP .IR "Conforming to" : POSIX.1-2001 and later. .PP
Signature · 1 line
2.33.1
RFC 6/37 system_data_types.7: Document useconds_t
In reply to Alejandro Colomar--- man7/system_data_types.7 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
man7/system_data_types.7 +29 -0
@@ -1993,6 +1993,35 @@ and .I void * types in this page. .RE +.\"------------------------------------- useconds_t -------------------/ +.TP +.I useconds_t +.RS +.IR Include : +.IR <sys/types.h> . +.PP +Used for time in microseconds. +According to POSIX, it shall be an unsigned integer type +capable of storing values at least in the range [0, 1000000], +and the implementation shall support one or more programming environments +where the width of +.I useconds_t +is no greater than the width of the type +.IR long . +.PP +.IR Versions : +POSIX.1-2001 defined +.I useconds_t +in +.I <unistd.h> +too. +.PP +.IR "Conforming to" : +POSIX.1-2001 and later. +.PP +.IR "See also" : +.BR usleep (3) +.RE .\"------------------------------------- va_list ----------------------/ .TP .I va_list
Signature · 1 line
2.33.1
RFC 7/37 useconds_t.3: New link to system_data_types(7)
In reply to Alejandro Colomar--- man3/useconds_t.3 | 1 + 1 file changed, 1 insertion(+) create mode 100644 man3/useconds_t.3
man3/useconds_t.3 new file +1 -0
@@ -0,0 +1 @@ +.so man7/system_data_types.7
Signature · 1 line
2.33.1
RFC 8/37 usleep.3: Remove incorrect portability note
In reply to Alejandro ColomarThat note against using useconds_t if portability is important was probably true before POSIX, but since POSIX specifies the type in <sys/types.h>, as recently documented in useconds_t(3), the type should be fine to use portably. Moreover, using it helps document the code, so we better completely remove that warning.
Add a SEE ALSO entry for useconds_t(3).
--- man3/usleep.3 | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)
man3/usleep.3 +1 -18
@@ -115,24 +115,6 @@ Only the .B EINVAL error return is documented by SUSv2 and POSIX.1-2001. .SH NOTES -The type -.I useconds_t -is an unsigned integer type capable of holding integers -in the range [0,1000000]. -Programs will be more portable -if they never mention this type explicitly. -Use -.PP -.in +4n -.EX -#include <unistd.h> -\&... - unsigned int usecs; -\&... - usleep(usecs); -.EE -.in -.PP The interaction of this function with the .B SIGALRM signal, and with other timer functions such as
@@ -155,4 +137,5 @@ is unspecified. .BR setitimer (2), .BR sleep (3), .BR ualarm (3), +.BR useconds_t (3), .BR time (7)
Signature · 1 line
2.33.1
RFC 9/37 aiocb-struct.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/aiocb-struct.3 | 32 +++++++++++++++++++++++++++++++- man7/system_data_types.7 | 34 ---------------------------------- 2 files changed, 31 insertions(+), 35 deletions(-)
man3/aiocb-struct.3 +31 -1
@@ -1 +1,31 @@ -.so man7/system_data_types.7 +.TH AIOCB-STRUCT 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +aiocb-struct \- asynchronous I/O control block +.SH SYNOPSIS +.nf +.B #include <aio.h> +.PP +.B struct aiocb { +.BR " int aio_fildes;" " /* File descriptor */" +.BR " off_t aio_offset;" " /* File offset */" +.BR " volatile void *aio_buf;" " /* Location of buffer */" +.BR " size_t aio_nbytes;" " /* Length of transfer */" +.BR " int aio_reqprio;" " /* Request priority offset */" +.BR " struct sigevent aio_sigevent;" " /* Signal number and value */" +.BR " int aio_lio_opcode;" " /* Operation to be performed */" +.B }; +.fi +.SH DESCRIPTION +For further information about this structure, see +.BR aio (7). +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH SEE ALSO +.BR aio_cancel (3), +.BR aio_error (3), +.BR aio_fsync (3), +.BR aio_read (3), +.BR aio_return (3), +.BR aio_suspend (3), +.BR aio_write (3), +.BR lio_listio (3)
man7/system_data_types.7 +0 -34
@@ -51,40 +51,6 @@ system_data_types \- overview of system data types .\" .\" * See also .\"------------------------------------- aiocb ------------------------/ -.TP -.I aiocb -.RS -.IR Include : -.IR <aio.h> . -.PP -.EX -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 */ -}; -.EE -.PP -For further information about this structure, see -.BR aio (7). -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR aio_cancel (3), -.BR aio_error (3), -.BR aio_fsync (3), -.BR aio_read (3), -.BR aio_return (3), -.BR aio_suspend (3), -.BR aio_write (3), -.BR lio_listio (3) -.RE .\"------------------------------------- blkcnt_t ---------------------/ .TP .I blkcnt_t
Signature · 1 line
2.33.1
RFC 10/37 blkcnt_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/blkcnt_t.3 | 21 ++++++++++++++++++++- man7/system_data_types.7 | 20 -------------------- 2 files changed, 20 insertions(+), 21 deletions(-)
man3/blkcnt_t.3 +20 -1
@@ -1 +1,20 @@ -.so man7/system_data_types.7 +.TH BLKCNT_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +blkcnt_t \- file block counts +.SH SYNOPSIS +.nf +.B #include <sys/types.h> +.PP +.BR typedef " /* ... */ " blkcnt_t; +.fi +.SH DESCRIPTION +Used for file block counts. +According to POSIX, +it shall be a signed integer type. +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH NOTES +The following header also provides this type: +.IR <sys/stat.h> . +.SH SEE ALSO +.BR stat-struct (3)
man7/system_data_types.7 +0 -20
@@ -52,26 +52,6 @@ system_data_types \- overview of system data types .\" * See also .\"------------------------------------- aiocb ------------------------/ .\"------------------------------------- blkcnt_t ---------------------/ -.TP -.I blkcnt_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <sys/stat.h> . -.PP -Used for file block counts. -According to POSIX, -it shall be a signed integer type. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -the -.I stat -structure in this page. -.RE .\"------------------------------------- blksize_t --------------------/ .TP .I blksize_t
Signature · 1 line
2.33.1
RFC 11/37 blksize_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/blksize_t.3 | 21 ++++++++++++++++++++- man7/system_data_types.7 | 20 -------------------- 2 files changed, 20 insertions(+), 21 deletions(-)
man3/blksize_t.3 +20 -1
@@ -1 +1,20 @@ -.so man7/system_data_types.7 +.TH BLKSIZE_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +blksize_t \- file block sizes +.SH SYNOPSIS +.nf +.B #include <sys/types.h> +.PP +.BR typedef " /* ... */ " blksize_t; +.fi +.SH DESCRIPTION +Used for file block sizes. +According to POSIX, +it shall be a signed integer type. +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH NOTES +The following header also provides this type: +.IR <sys/stat.h> . +.SH SEE ALSO +.BR stat-struct (3)
man7/system_data_types.7 +0 -20
@@ -53,26 +53,6 @@ system_data_types \- overview of system data types .\"------------------------------------- aiocb ------------------------/ .\"------------------------------------- blkcnt_t ---------------------/ .\"------------------------------------- blksize_t --------------------/ -.TP -.I blksize_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <sys/stat.h> . -.PP -Used for file block sizes. -According to POSIX, -it shall be a signed integer type. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -the -.I stat -structure in this page. -.RE .\"------------------------------------- cc_t -------------------------/ .TP .I cc_t
Signature · 1 line
2.33.1
RFC 12/37 cc_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/cc_t.3 | 18 +++++++++++++++++- man7/system_data_types.7 | 16 ---------------- 2 files changed, 17 insertions(+), 17 deletions(-)
man3/cc_t.3 +17 -1
@@ -1 +1,17 @@ -.so man7/system_data_types.7 +.TH CC_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +cc_t \- terminal special characters +.SH SYNOPSIS +.nf +.B #include <termios.h> +.PP +.BR typedef " /* ... */ " cc_t; +.fi +.SH DESCRIPTION +Used for terminal special characters. +According to POSIX, +it shall be an unsigned integer type. +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH SEE ALSO +.BR termios (3)
man7/system_data_types.7 +0 -16
@@ -54,22 +54,6 @@ system_data_types \- overview of system data types .\"------------------------------------- blkcnt_t ---------------------/ .\"------------------------------------- blksize_t --------------------/ .\"------------------------------------- cc_t -------------------------/ -.TP -.I cc_t -.RS -.IR Include : -.IR <termios.h> . -.PP -Used for terminal special characters. -According to POSIX, -it shall be an unsigned integer type. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR termios (3) -.RE .\"------------------------------------- clock_t ----------------------/ .TP .I clock_t
Signature · 1 line
2.33.1
RFC 13/37 clock_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/clock_t.3 | 27 ++++++++++++++++++++++++++- man7/system_data_types.7 | 24 ------------------------ 2 files changed, 26 insertions(+), 25 deletions(-)
man3/clock_t.3 +26 -1
@@ -1 +1,26 @@ -.so man7/system_data_types.7 +.TH CLOCK_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +clock_t \- system time +.SH SYNOPSIS +.nf +.B #include <time.h> +.PP +.BR typedef " /* ... */ " clock_t; +.fi +.SH DESCRIPTION +Used for system time in clock ticks or +.B CLOCKS_PER_SEC +(defined in +.IR <time.h> ). +According to POSIX, +it shall be an integer type or a real-floating type. +.SH CONFORMING TO +C99 and later; POSIX.1-2001 and later. +.SH NOTES +The following headers also provide this type: +.I <sys/types.h> +and +.IR <sys/time.h> . +.SH SEE ALSO +.BR times (2), +.BR clock (3)
man7/system_data_types.7 +0 -24
@@ -55,30 +55,6 @@ system_data_types \- overview of system data types .\"------------------------------------- blksize_t --------------------/ .\"------------------------------------- cc_t -------------------------/ .\"------------------------------------- clock_t ----------------------/ -.TP -.I clock_t -.RS -.IR Include : -.I <time.h> -or -.IR <sys/types.h> . -Alternatively, -.IR <sys/time.h> . -.PP -Used for system time in clock ticks or -.B CLOCKS_PER_SEC -(defined in -.IR <time.h> ). -According to POSIX, -it shall be an integer type or a real-floating type. -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR times (2), -.BR clock (3) -.RE .\"------------------------------------- clockid_t --------------------/ .TP .I clockid_t
Signature · 1 line
2.33.1
RFC 14/37 clockid_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/clockid_t.3 | 25 ++++++++++++++++++++++++- man7/system_data_types.7 | 22 ---------------------- 2 files changed, 24 insertions(+), 23 deletions(-)
man3/clockid_t.3 +24 -1
@@ -1 +1,24 @@ -.so man7/system_data_types.7 +.TH CLOCKID_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +clockid_t \- clock ID for the clock and timer functions +.SH SYNOPSIS +.nf +.B #include <sys/types.h> +.PP +.BR typedef " /* ... */ " clockid_t; +.fi +.SH DESCRIPTION +Used for clock ID type in the clock and timer functions. +According to POSIX, +it shall be defined as an arithmetic type. +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH NOTES +The following header also provides this type: +.IR <time.h> . +.SH SEE ALSO +.BR clock_adjtime (2), +.BR clock_getres (2), +.BR clock_nanosleep (2), +.BR timer_create (2), +.BR clock_getcpuclockid (3)
man7/system_data_types.7 +0 -22
@@ -56,28 +56,6 @@ system_data_types \- overview of system data types .\"------------------------------------- cc_t -------------------------/ .\"------------------------------------- clock_t ----------------------/ .\"------------------------------------- clockid_t --------------------/ -.TP -.I clockid_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <time.h> . -.PP -Used for clock ID type in the clock and timer functions. -According to POSIX, -it shall be defined as an arithmetic type. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR clock_adjtime (2), -.BR clock_getres (2), -.BR clock_nanosleep (2), -.BR timer_create (2), -.BR clock_getcpuclockid (3) -.RE .\"------------------------------------- dev_t ------------------------/ .TP .I dev_t
Signature · 1 line
2.33.1
RFC 15/37 dev_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/dev_t.3 | 24 +++++++++++++++++++++++- man7/system_data_types.7 | 25 ------------------------- 2 files changed, 23 insertions(+), 26 deletions(-)
man3/dev_t.3 +23 -1
@@ -1 +1,23 @@ -.so man7/system_data_types.7 +.TH DEV_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +dev_t \- devide ID +.SH SYNOPSIS +.nf +.B #include <sys/types.h> +.PP +.BR typedef " /* ... */ " dev_t; +.fi +.SH DESCRIPTION +Used for device IDs. +According to POSIX, +it shall be an integer type. +For further details of this type, see +.BR makedev (3). +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH NOTES +The following header also provides this type: +.IR <sys/stat.h> . +.SH SEE ALSO +.BR mknod (2), +.BR stat-struct (3)
man7/system_data_types.7 +0 -25
@@ -57,31 +57,6 @@ system_data_types \- overview of system data types .\"------------------------------------- clock_t ----------------------/ .\"------------------------------------- clockid_t --------------------/ .\"------------------------------------- dev_t ------------------------/ -.TP -.I dev_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <sys/stat.h> . -.PP -Used for device IDs. -According to POSIX, -it shall be an integer type. -For further details of this type, see -.BR makedev (3). -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR mknod (2) -.PP -.IR "See also" : -the -.I stat -structure in this page. -.RE .\"------------------------------------- div_t ------------------------/ .TP .I div_t
Signature · 1 line
2.33.1
RFC 16/37 div_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/div_t.3 | 20 +++++++++++++++++++- man7/system_data_types.7 | 23 ----------------------- 2 files changed, 19 insertions(+), 24 deletions(-)
man3/div_t.3 +19 -1
@@ -1 +1,19 @@ -.so man7/system_data_types.7 +.TH DIV_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +div_t \- quotient and remainder of an integer division +.SH SYNOPSIS +.nf +.B #include <stdlib.h> +.PP +.B typedef struct { +.BR " int quot;" " /* Quotient */" +.BR " int rem;" " /* Remainder */" +.B } div_t; +.SH DESCRIPTION +It is the type of the value returned by the +.BR div (3) +function. +.SH CONFORMING TO +C99 and later; POSIX.1-2001 and later. +.SH SEE ALSO +.BR div (3)
man7/system_data_types.7 +0 -23
@@ -58,29 +58,6 @@ system_data_types \- overview of system data types .\"------------------------------------- clockid_t --------------------/ .\"------------------------------------- dev_t ------------------------/ .\"------------------------------------- div_t ------------------------/ -.TP -.I div_t -.RS -.IR Include : -.IR <stdlib.h> . -.PP -.EX -typedef struct { - int quot; /* Quotient */ - int rem; /* Remainder */ -} div_t; -.EE -.PP -It is the type of the value returned by the -.BR div (3) -function. -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR div (3) -.RE .\"------------------------------------- double_t ---------------------/ .TP .I double_t
Signature · 1 line
2.33.1
RFC 17/37 double_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/double_t.3 | 42 +++++++++++++++++++++++++++++++++++++++- man7/system_data_types.7 | 42 ---------------------------------------- 2 files changed, 41 insertions(+), 43 deletions(-)
man3/double_t.3 +41 -1
@@ -1 +1,41 @@ -.so man7/system_data_types.7 +.TH DOUBLE_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +double_t \- most efficient floating types +.SH SYNOPSIS +.nf +.B #include <math.h> +.PP +.BR typedef " /* ... */ " double_t; +.fi +.SH DESCRIPTION +The implementation's most efficient floating type at least as wide as +.IR double . +Its type depends on the value of the macro +.B FLT_EVAL_METHOD +(defined in +.IR <float.h> ): +.TP +0 +.I double_t +is +.IR double . +.TP +1 +.I double_t +is +.IR double . +.TP +2 +.I double_t +is +.IR "long double" . +.PP +For other values of +.BR FLT_EVAL_METHOD , +the type of +.I double_t +is implementation-defined. +.SH CONFORMING TO +C99 and later; POSIX.1-2001 and later. +.SH SEE ALSO +.BR float_t (3)
man7/system_data_types.7 +0 -42
48 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 18/37 double_t.3, float_t.3, system_data_types.7: Move float_t to double_t.3
In reply to Alejandro Colomar--- man3/double_t.3 | 47 +++++++++++++++++++++------------------- man3/float_t.3 | 2 +- man7/system_data_types.7 | 42 ----------------------------------- 3 files changed, 26 insertions(+), 65 deletions(-)
man3/double_t.3 +25 -22
@@ -1,41 +1,44 @@ .TH DOUBLE_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -double_t \- most efficient floating types +float_t, double_t \- most efficient floating types .SH SYNOPSIS .nf .B #include <math.h> .PP +.BR typedef " /* ... */ " float_t; .BR typedef " /* ... */ " double_t; .fi .SH DESCRIPTION -The implementation's most efficient floating type at least as wide as -.IR double . -Its type depends on the value of the macro +The implementation's most efficient floating types at least as wide as +.I float +and +.I double +respectively. +Their type depends on the value of the macro .B FLT_EVAL_METHOD (defined in .IR <float.h> ): -.TP -0 -.I double_t -is -.IR double . -.TP -1 -.I double_t -is -.IR double . -.TP -2 -.I double_t -is -.IR "long double" . +.PP +.TS +lB rI rI. +FLT_EVAL_METHOD float_t double_t +.T& +n rI rI. +_ +0 float double +1 double double +2 long double long double +.TE .PP For other values of .BR FLT_EVAL_METHOD , -the type of +the types of +.I float_t +and .I double_t -is implementation-defined. +are implementation-defined. .SH CONFORMING TO C99 and later; POSIX.1-2001 and later. .SH SEE ALSO -.BR float_t (3) +.BR float.h (0p), +.BR math.h (0p)
man3/float_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/double_t.3
man7/system_data_types.7 +0 -42
48 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 19/37 select.2, system_data_types.7: Move fd_set to select.2
In reply to Alejandro Colomar--- man2/select.2 | 20 +++++++++++++++++++- man7/system_data_types.7 | 21 --------------------- 2 files changed, 19 insertions(+), 22 deletions(-)
man2/select.2 +19 -1
@@ -39,12 +39,14 @@ .\" .TH SELECT 2 2021-03-22 "Linux" "Linux Programmer's Manual" .SH NAME -select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO \- +select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO, fd_set \- synchronous I/O multiplexing .SH SYNOPSIS .nf .B #include <sys/select.h> .PP +.BR typedef " /* ... */ " fd_set; +.PP .BI "int select(int " nfds ", fd_set *restrict " readfds , .BI " fd_set *restrict " writefds ", fd_set *restrict " exceptfds , .BI " struct timeval *restrict " timeout );
@@ -93,6 +95,14 @@ or a sufficiently small .BR write (2)) without blocking. .\" +.SS fd_set +A structure type that can represent a set of file descriptors. +According to POSIX, +the maximum number of file descriptors in an +.I fd_set +structure is the value of the macro +.BR FD_SETSIZE . +.\" .SS File descriptor sets The principal arguments of .BR select ()
@@ -453,7 +463,15 @@ sets the timeout variable before returning, but the BSD variant does not. .BR pselect () is defined in POSIX.1g, and in POSIX.1-2001 and POSIX.1-2008. +.PP +.B fd_set +is defined in POSIX.1-2001 and later. .SH NOTES +The following header also provides the +.I fd_set +type: +.IR <sys/time.h> . +.PP An .I fd_set is a fixed size buffer.
man7/system_data_types.7 +0 -21
@@ -60,27 +60,6 @@ system_data_types \- overview of system data types .\"------------------------------------- div_t ------------------------/ .\"------------------------------------- double_t ---------------------/ .\"------------------------------------- fd_set -----------------------/ -.TP -.I fd_set -.RS -.IR Include : -.IR <sys/select.h> . -Alternatively, -.IR <sys/time.h> . -.PP -A structure type that can represent a set of file descriptors. -According to POSIX, -the maximum number of file descriptors in an -.I fd_set -structure is the value of the macro -.BR FD_SETSIZE . -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR select (2) -.RE .\"------------------------------------- fenv_t -----------------------/ .TP .I fenv_t
Signature · 1 line
2.33.1
RFC 20/37 fenv_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/fenv_t.3 | 18 +++++++++++++++++- man7/system_data_types.7 | 16 ---------------- 2 files changed, 17 insertions(+), 17 deletions(-)
man3/fenv_t.3 +17 -1
@@ -1 +1,17 @@ -.so man7/system_data_types.7 +.TH FENV_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +fenv_t \- floating-point environment +.SH SYNOPSIS +.nf +.B #include <fenv.h> +.PP +.BR typedef " /* ... */ " fenv_t; +.fi +.SH DESCRIPTION +This type represents the entire floating-point environment, +including control modes and status flags; for further details, see +.BR fenv (3). +.SH CONFORMING TO +C99 and later; POSIX.1-2001 and later. +.SH SEE ALSO +.BR fenv (3)
man7/system_data_types.7 +0 -16
@@ -61,22 +61,6 @@ system_data_types \- overview of system data types .\"------------------------------------- double_t ---------------------/ .\"------------------------------------- fd_set -----------------------/ .\"------------------------------------- fenv_t -----------------------/ -.TP -.I fenv_t -.RS -.IR Include : -.IR <fenv.h> . -.PP -This type represents the entire floating-point environment, -including control modes and status flags; for further details, see -.BR fenv (3). -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR fenv (3) -.RE .\"------------------------------------- fexcept_t --------------------/ .TP .I fexcept_t
Signature · 1 line
2.33.1
RFC 21/37 fenv_t.3, system_data_types.7: Move fexcept_t to fenv_t.3
In reply to Alejandro Colomar--- man3/fenv_t.3 | 13 ++++++++++--- man3/fexcept_t.3 | 2 +- man7/system_data_types.7 | 16 ---------------- 3 files changed, 11 insertions(+), 20 deletions(-)
man3/fenv_t.3 +10 -3
@@ -1,15 +1,22 @@ .TH FENV_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -fenv_t \- floating-point environment +fenv_t, fexcept_t \- floating-point environment .SH SYNOPSIS .nf .B #include <fenv.h> .PP .BR typedef " /* ... */ " fenv_t; +.BR typedef " /* ... */ " fexcept_t; .fi .SH DESCRIPTION -This type represents the entire floating-point environment, -including control modes and status flags; for further details, see +.I fenv_t +represents the entire floating-point environment, +including control modes and status flags. +.PP +.I fexcept_t +represents the floating-point status flags collectively. +.PP +For further details see .BR fenv (3). .SH CONFORMING TO C99 and later; POSIX.1-2001 and later.
man3/fexcept_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/fenv_t.3
man7/system_data_types.7 +0 -16
@@ -62,22 +62,6 @@ system_data_types \- overview of system data types .\"------------------------------------- fd_set -----------------------/ .\"------------------------------------- fenv_t -----------------------/ .\"------------------------------------- fexcept_t --------------------/ -.TP -.I fexcept_t -.RS -.IR Include : -.IR <fenv.h> . -.PP -This type represents the floating-point status flags collectively; -for further details see -.BR fenv (3). -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR fenv (3) -.RE .\"------------------------------------- FILE -------------------------/ .TP .I FILE
Signature · 1 line
2.33.1
RFC 22/37 FILE.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/FILE.3 | 26 +++++++++++++++++++++++++- man7/system_data_types.7 | 23 ----------------------- 2 files changed, 25 insertions(+), 24 deletions(-)
man3/FILE.3 +25 -1
@@ -1 +1,25 @@ -.so man7/system_data_types.7 +.TH FILE 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +FILE \- input/output stream +.SH SYNOPSIS +.nf +.B #include <stdio.h> +.PP +.BR typedef " /* ... */ " FILE; +.fi +.SH DESCRIPTION +An object type used for streams. +.SH CONFORMING TO +C99 and later; POSIX.1-2001 and later. +.SH NOTES +The following header also provides this type: +.IR <wchar.h> . +.SH SEE ALSO +.BR fclose (3), +.BR flockfile (3), +.BR fopen (3), +.BR fprintf (3), +.BR fread (3), +.BR fscanf (3), +.BR stdin (3), +.BR stdio (3)
man7/system_data_types.7 +0 -23
@@ -63,29 +63,6 @@ system_data_types \- overview of system data types .\"------------------------------------- fenv_t -----------------------/ .\"------------------------------------- fexcept_t --------------------/ .\"------------------------------------- FILE -------------------------/ -.TP -.I FILE -.RS -.IR Include : -.IR <stdio.h> . -Alternatively, -.IR <wchar.h> . -.PP -An object type used for streams. -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR fclose (3), -.BR flockfile (3), -.BR fopen (3), -.BR fprintf (3), -.BR fread (3), -.BR fscanf (3), -.BR stdin (3), -.BR stdio (3) -.RE .\"------------------------------------- float_t ----------------------/ .\"------------------------------------- gid_t ------------------------/ .TP
Signature · 1 line
2.33.1
RFC 23/37 id_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/id_t.3 | 26 +++++++++++++++++++++++++- man7/system_data_types.7 | 23 ----------------------- 2 files changed, 25 insertions(+), 24 deletions(-)
man3/id_t.3 +25 -1
@@ -1 +1,25 @@ -.so man7/system_data_types.7 +.TH ID_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +id_t \- process/user/group identifier +.SH SYNOPSIS +.nf +.B #include <sys/types.h> +.PP +.BR typedef " /* ... */ " id_t; +.fi +.SH DESCRIPTION +A type used to hold a general identifier. +According to POSIX, +this shall be an integer type that can be used to contain a +.IR pid_t , +.IR uid_t , +or +.IR gid_t . +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH NOTES +The following header also provides this type: +.IR <sys/resource.h> . +.SH SEE ALSO +.BR getpriority (2), +.BR waitid (2)
man7/system_data_types.7 +0 -23
@@ -97,29 +97,6 @@ POSIX.1-2001 and later. .BR credentials (7) .RE .\"------------------------------------- id_t -------------------------/ -.TP -.I id_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <sys/resource.h> . -.PP -A type used to hold a general identifier. -According to POSIX, -this shall be an integer type that can be used to contain a -.IR pid_t , -.IR uid_t , -or -.IR gid_t . -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR getpriority (2), -.BR waitid (2) -.RE .\"------------------------------------- imaxdiv_t --------------------/ .TP .I imaxdiv_t
Signature · 1 line
2.33.1
RFC 24/37 gid_t.3, id_t.3, system_data_types.7: Move gid_t to id_t.3
In reply to Alejandro Colomar--- man3/gid_t.3 | 2 +- man3/id_t.3 | 34 ++++++++++++++++++++++++++++++---- man7/system_data_types.7 | 31 ------------------------------- 3 files changed, 31 insertions(+), 36 deletions(-)
man3/gid_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/id_t.3
man3/id_t.3 +30 -4
@@ -1,16 +1,23 @@ .TH ID_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -id_t \- process/user/group identifier +gid_t, id_t \- process/user/group identifier .SH SYNOPSIS .nf .B #include <sys/types.h> .PP +.BR typedef " /* ... */ " gid_t; .BR typedef " /* ... */ " id_t; .fi .SH DESCRIPTION -A type used to hold a general identifier. +.I gid_t +is a type used to hold group IDs. According to POSIX, -this shall be an integer type that can be used to contain a +it shall be an integer type. +.PP +.I id_t +is a type used to hold a general identifier. +According to POSIX, +it shall be an integer type that can be used to contain a .IR pid_t , .IR uid_t , or
@@ -18,8 +25,27 @@ or .SH CONFORMING TO POSIX.1-2001 and later. .SH NOTES -The following header also provides this type: +The following headers also provide +.IR gid_t : +.IR <grp.h> , +.IR <pwd.h> , +.IR <signal.h> , +.IR <stropts.h> , +.IR <sys/ipc.h> , +.IR <sys/stat.h> , +and +.IR <unistd.h> . +.PP +The following header also provides +.IR id_t : .IR <sys/resource.h> . .SH SEE ALSO +.BR chown (2), +.BR getgid (2), +.BR getegid (2), +.BR getgroups (2), .BR getpriority (2), +.BR getresgid (2), .BR waitid (2) +.BR getgrnam (3), +.BR credentials (7)
man7/system_data_types.7 +0 -31
@@ -65,37 +65,6 @@ system_data_types \- overview of system data types .\"------------------------------------- FILE -------------------------/ .\"------------------------------------- float_t ----------------------/ .\"------------------------------------- gid_t ------------------------/ -.TP -.I gid_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <grp.h> , -.IR <pwd.h> , -.IR <signal.h> , -.IR <stropts.h> , -.IR <sys/ipc.h> , -.IR <sys/stat.h> , -or -.IR <unistd.h> . -.PP -A type used to hold group IDs. -According to POSIX, -this shall be an integer type. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR chown (2), -.BR getgid (2), -.BR getegid (2), -.BR getgroups (2), -.BR getresgid (2), -.BR getgrnam (3), -.BR credentials (7) -.RE .\"------------------------------------- id_t -------------------------/ .\"------------------------------------- imaxdiv_t --------------------/ .TP
Signature · 1 line
2.33.1
RFC 25/37 id_t.3, pid_t.3, system_data_types.7: Move pid_t to id_t.3
In reply to Alejandro Colomar--- man3/id_t.3 | 42 ++++++++++++++++++++++++++++++++++--- man3/pid_t.3 | 2 +- man7/system_data_types.7 | 45 ---------------------------------------- 3 files changed, 40 insertions(+), 49 deletions(-)
man3/id_t.3 +39 -3
@@ -1,14 +1,24 @@ .TH ID_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -gid_t, id_t \- process/user/group identifier +pid_t, gid_t, id_t \- process/user/group identifier .SH SYNOPSIS .nf .B #include <sys/types.h> .PP +.BR typedef " /* ... */ " pid_t; .BR typedef " /* ... */ " gid_t; .BR typedef " /* ... */ " id_t; .fi .SH DESCRIPTION +.I pid_t +is a type 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 +.I pid_t +is no greater than the width of the type +.IR long . +.PP .I gid_t is a type used to hold group IDs. According to POSIX,
@@ -26,6 +36,22 @@ or POSIX.1-2001 and later. .SH NOTES The following headers also provide +.IR pid_t : +.IR <fcntl.h> , +.IR <sched.h> , +.IR <signal.h> , +.IR <spawn.h> , +.IR <sys/msg.h> , +.IR <sys/sem.h> , +.IR <sys/shm.h> , +.IR <sys/wait.h> , +.IR <termios.h> , +.IR <time.h> , +.IR <unistd.h> , +and +.IR <utmpx.h> . +.PP +The following headers also provide .IR gid_t : .IR <grp.h> , .IR <pwd.h> ,
@@ -41,11 +67,21 @@ The following header also provides .IR <sys/resource.h> . .SH SEE ALSO .BR chown (2), -.BR getgid (2), +.BR fork (2), .BR getegid (2), +.BR getgid (2), .BR getgroups (2), +.BR getpgid (2), +.BR getpid (2), +.BR getppid (2), .BR getpriority (2), .BR getresgid (2), -.BR waitid (2) +.BR getsid (2), +.BR gettid (2), +.BR kill (2), +.BR pidfd_open (2), +.BR sched_setscheduler (2), +.BR waitid (2), .BR getgrnam (3), +.BR sigqueue (3), .BR credentials (7)
man3/pid_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/id_t.3
man7/system_data_types.7 +0 -45
51 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 26/37 id_t.3, uid_t.3, system_data_types.7: Move uid_t to id_t.3
In reply to Alejandro Colomar--- man3/id_t.3 | 22 +++++++++++++++++++++- man3/uid_t.3 | 2 +- man7/system_data_types.7 | 29 ----------------------------- 3 files changed, 22 insertions(+), 31 deletions(-)
man3/id_t.3 +21 -1
@@ -1,11 +1,12 @@ .TH ID_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -pid_t, gid_t, id_t \- process/user/group identifier +pid_t, uid_t, gid_t, id_t \- process/user/group identifier .SH SYNOPSIS .nf .B #include <sys/types.h> .PP .BR typedef " /* ... */ " pid_t; +.BR typedef " /* ... */ " uid_t; .BR typedef " /* ... */ " gid_t; .BR typedef " /* ... */ " id_t; .fi
@@ -19,6 +20,11 @@ where the width of is no greater than the width of the type .IR long . .PP +.I uid_t +is a type used to hold user IDs. +According to POSIX, +it shall be an integer type. +.PP .I gid_t is a type used to hold group IDs. According to POSIX,
@@ -52,6 +58,16 @@ and .IR <utmpx.h> . .PP The following headers also provide +.IR uid_t : +.IR <pwd.h> , +.IR <signal.h> , +.IR <stropts.h> , +.IR <sys/ipc.h> , +.IR <sys/stat.h> , +or +.IR <unistd.h> . +.PP +The following headers also provide .IR gid_t : .IR <grp.h> , .IR <pwd.h> ,
@@ -69,15 +85,19 @@ The following header also provides .BR chown (2), .BR fork (2), .BR getegid (2), +.BR geteuid (2), .BR getgid (2), .BR getgroups (2), .BR getpgid (2), .BR getpid (2), .BR getppid (2), .BR getpriority (2), +.BR getpwnam (3), .BR getresgid (2), +.BR getresuid (2), .BR getsid (2), .BR gettid (2), +.BR getuid (2), .BR kill (2), .BR pidfd_open (2), .BR sched_setscheduler (2),
man3/uid_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/id_t.3
man7/system_data_types.7 +0 -29
@@ -1312,35 +1312,6 @@ POSIX.1-2001 and later. .BR timeradd (3) .RE .\"------------------------------------- uid_t ----------------------/ -.TP -.I uid_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <pwd.h> , -.IR <signal.h> , -.IR <stropts.h> , -.IR <sys/ipc.h> , -.IR <sys/stat.h> , -or -.IR <unistd.h> . -.PP -A type used to hold user IDs. -According to POSIX, -this shall be an integer type. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR chown (2), -.BR getuid (2), -.BR geteuid (2), -.BR getresuid (2), -.BR getpwnam (3), -.BR credentials (7) -.RE .\"------------------------------------- uintmax_t --------------------/ .TP .I uintmax_t
Signature · 1 line
2.33.1
RFC 27/37 div_t.3, imaxdiv_t.3, system_data_types.7: Move imaxdiv_t to div_t.3
In reply to Alejandro Colomar--- man3/div_t.3 | 21 ++++++++++++++++++--- man3/imaxdiv_t.3 | 2 +- man7/system_data_types.7 | 23 ----------------------- 3 files changed, 19 insertions(+), 27 deletions(-)
man3/div_t.3 +18 -3
@@ -1,6 +1,6 @@ .TH DIV_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -div_t \- quotient and remainder of an integer division +div_t, imaxdiv_t \- quotient and remainder of an integer division .SH SYNOPSIS .nf .B #include <stdlib.h>
@@ -9,11 +9,26 @@ div_t \- quotient and remainder of an integer division .BR " int quot;" " /* Quotient */" .BR " int rem;" " /* Remainder */" .B } div_t; +.PP +.B #include <inttypes.h> +.PP +.B typedef struct { +.BR " intmax_t quot;" " /* Quotient */" +.BR " intmax_t rem;" " /* Remainder */" +.B } imaxdiv_t; +.fi .SH DESCRIPTION -It is the type of the value returned by the +.I div_t +is the type of the value returned by the .BR div (3) function. +.PP +.I imaxdiv_t +is the type of the value returned by the +.BR imaxdiv (3) +function. .SH CONFORMING TO C99 and later; POSIX.1-2001 and later. .SH SEE ALSO -.BR div (3) +.BR div (3), +.BR imaxdiv (3)
man3/imaxdiv_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/div_t.3
man7/system_data_types.7 +0 -23
@@ -67,29 +67,6 @@ system_data_types \- overview of system data types .\"------------------------------------- gid_t ------------------------/ .\"------------------------------------- id_t -------------------------/ .\"------------------------------------- imaxdiv_t --------------------/ -.TP -.I imaxdiv_t -.RS -.IR Include : -.IR <inttypes.h> . -.PP -.EX -typedef struct { - intmax_t quot; /* Quotient */ - intmax_t rem; /* Remainder */ -} imaxdiv_t; -.EE -.PP -It is the type of the value returned by the -.BR imaxdiv (3) -function. -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR imaxdiv (3) -.RE .\"------------------------------------- intmax_t ---------------------/ .TP .I intmax_t
Signature · 1 line
2.33.1
RFC 28/37 intmax_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro ColomarI also reworded the text slightly to talk about 'basic integer types', not 'integer types', to more clearly exclude 'extended integer types'.
--- man3/intmax_t.3 | 51 +++++++++++++++++++++++++++++++++++- man7/system_data_types.7 | 56 ---------------------------------------- 2 files changed, 50 insertions(+), 57 deletions(-)
man3/intmax_t.3 +50 -1
@@ -1 +1,50 @@ -.so man7/system_data_types.7 +.TH INTMAX_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +intmax_t \- greatest-width basic integer type +.SH SYNOPSIS +.nf +.B #include stdint.h> +.PP +.BR typedef " /* ... */ " intmax_t; +.fi +.SH DESCRIPTION +A signed integer type +capable of representing any value of any basic signed integer type +supported by the implementation. +According to the C language standard, it shall be +capable of storing values in the range +.RB [ INTMAX_MIN , +.BR INTMAX_MAX ]. +.PP +The macro +.BR INTMAX_C () +expands its argument to an integer constant of type +.IR intmax_t . +.PP +The length modifier for +.I intmax_t +for the +.BR printf (3) +and the +.BR scanf (3) +families of functions is +.BR j ; +resulting commonly in +.B %jd +or +.B %ji +for printing +.I intmax_t +values. +.SH CONFORMING TO +C99 and later; POSIX.1-2001 and later. +.SH NOTES +The following header also provides this type: +.IR <inttypes.h> . +.SH BUGS +.I intmax_t +may not be as large as extended integer types, such as +.I __int128 +.SH SEE ALSO +.BR printf (3), +.BR strtoimax (3)
man7/system_data_types.7 +0 -56
62 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 29/37 intmax_t.3, uintmax_t.3, system_data_types.7: Move uintmax_t to intmax_t.3
In reply to Alejandro Colomar--- man3/intmax_t.3 | 38 +++++++++++++++++++++------ man3/uintmax_t.3 | 2 +- man7/system_data_types.7 | 55 ---------------------------------------- 3 files changed, 31 insertions(+), 64 deletions(-)
man3/intmax_t.3 +30 -8
@@ -1,14 +1,16 @@ .TH INTMAX_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -intmax_t \- greatest-width basic integer type +intmax_t, uintmax_t \- greatest-width basic integer types .SH SYNOPSIS .nf -.B #include stdint.h> +.B #include <stdint.h> .PP .BR typedef " /* ... */ " intmax_t; +.BR typedef " /* ... */ " uintmax_t; .fi .SH DESCRIPTION -A signed integer type +.I intmax_t +is a signed integer type capable of representing any value of any basic signed integer type supported by the implementation. According to the C language standard, it shall be
@@ -16,13 +18,28 @@ capable of storing values in the range .RB [ INTMAX_MIN , .BR INTMAX_MAX ]. .PP +.I uintmax_t +is an unsigned integer type +capable of representing any value of any basic unsigned integer type +supported by the implementation. +According to the C language standard, it shall be +capable of storing values in the range [0, +.BR UINTMAX_MAX ]. +.PP The macro .BR INTMAX_C () expands its argument to an integer constant of type .IR intmax_t . .PP +The macro +.BR UINTMAX_C () +expands its argument to an integer constant of type +.IR uintmax_t . +.PP The length modifier for .I intmax_t +and +.I uintmax_t for the .BR printf (3) and the
@@ -30,21 +47,26 @@ and the families of functions is .BR j ; resulting commonly in -.B %jd +.BR %jd , +.BR %ji , +.BR %ju , or -.B %ji +.B %jx for printing .I intmax_t +or +.I uintmax_t values. .SH CONFORMING TO C99 and later; POSIX.1-2001 and later. .SH NOTES -The following header also provides this type: +The following header also provides these types: .IR <inttypes.h> . .SH BUGS -.I intmax_t -may not be as large as extended integer types, such as +These types may not be as large as extended integer types, such as .I __int128 .SH SEE ALSO +.BR int64_t (3), +.BR intptr_t (3), .BR printf (3), .BR strtoimax (3)
man3/uintmax_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intmax_t.3
man7/system_data_types.7 +0 -55
61 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 30/37 intmax_t.3: Document the [U]INTMAX_* macros
In reply to Alejandro Colomar--- man3/intmax_t.3 | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-)
man3/intmax_t.3 +28 -13
@@ -7,6 +7,16 @@ intmax_t, uintmax_t \- greatest-width basic integer types .PP .BR typedef " /* ... */ " intmax_t; .BR typedef " /* ... */ " uintmax_t; +.PP +.BR "#define INTMAX_WIDTH " "/* ... */" +.B "#define UINTMAX_WIDTH INTMAX_WIDTH" +.PP +.BR "#define INTMAX_MAX " "/* 2**(INTMAX_WIDTH - 1) - 1 */" +.BR "#define INTMAX_MIN " "/* - 2**(INTMAX_WIDTH - 1) */" +.BR "#define UINTMAX_MAX " "/* 2**UINTMAX_WIDTH - 1 */" +.PP +.BI "#define INTMAX_C(" c ) " c " ## " \fR/* ... */\fP" +.BI "#define UINTMAX_C(" c ) " c " ## " \fR/* ... */\fP" .fi .SH DESCRIPTION .I intmax_t
@@ -26,20 +36,27 @@ According to the C language standard, it shall be capable of storing values in the range [0, .BR UINTMAX_MAX ]. .PP -The macro -.BR INTMAX_C () -expands its argument to an integer constant of type -.IR intmax_t . +The macros +.RB [ U ] INTMAX_WIDTH +expand to the width in bits of these types. +.PP +The macros +.RB [ U ] INTMAX_MAX +expand to the maximum value that these types can hold. .PP The macro -.BR UINTMAX_C () -expands its argument to an integer constant of type -.IR uintmax_t . +.B INTMAX_MIN +expands to the minimum value that +.I intmax_t +can hold. +.PP +The macros +.RB [ U ] INTMAX_C () +expand their argument to an integer constant of type +.RI [ u ] intmax_t . .PP The length modifier for -.I intmax_t -and -.I uintmax_t +.RI [ u ] intmax_t for the .BR printf (3) and the
@@ -53,9 +70,7 @@ resulting commonly in or .B %jx for printing -.I intmax_t -or -.I uintmax_t +.RI [ u ] intmax_t values. .SH CONFORMING TO C99 and later; POSIX.1-2001 and later.
Signature · 1 line
2.33.1
RFC 31/37 intN_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/int16_t.3 | 2 +- man3/int32_t.3 | 2 +- man3/int64_t.3 | 2 +- man3/int8_t.3 | 2 +- man3/intN_t.3 | 81 +++++++++++++++++++++++++++++++++++++++- man7/system_data_types.7 | 81 ---------------------------------------- 6 files changed, 84 insertions(+), 86 deletions(-)
man3/int16_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/int32_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/int64_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/int8_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/intN_t.3 +80 -1
81 lines not on this page · raw message
man7/system_data_types.7 +0 -81
87 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 32/37 intN_t.3, uint16_t.3, uint32_t.3, uint64_t.3, uint8_t.3, uintN_t.3, system_data_types.7: Move uintN_t to intN_t.3
In reply to Alejandro Colomar--- man3/intN_t.3 | 64 +++++++++++++++++++++--------- man3/uint16_t.3 | 2 +- man3/uint32_t.3 | 2 +- man3/uint64_t.3 | 2 +- man3/uint8_t.3 | 2 +- man3/uintN_t.3 | 2 +- man7/system_data_types.7 | 84 ---------------------------------------- 7 files changed, 50 insertions(+), 108 deletions(-)
man3/intN_t.3 +45 -19
@@ -1,6 +1,8 @@ .TH INTN_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -intN_t, int8_t, int16_t, int32_t, int64_t \- fixed-width basic integer types +intN_t, int8_t, int16_t, int32_t, int64_t, +uintN_t, uint8_t, uint16_t, uint32_t, uint64_t +\- fixed-width basic integer types .SH SYNOPSIS .nf .B #include <stdint.h>
@@ -9,38 +11,60 @@ intN_t, int8_t, int16_t, int32_t, int64_t \- fixed-width basic integer types .BR typedef " /* ... */ " int16_t; .BR typedef " /* ... */ " int32_t; .BR typedef " /* ... */ " int64_t; +.PP +.BR typedef " /* ... */ " uint8_t; +.BR typedef " /* ... */ " uint16_t; +.BR typedef " /* ... */ " uint32_t; +.BR typedef " /* ... */ " uint64_t; .fi .SH DESCRIPTION .IR int N _t are signed integer types of a fixed width of exactly N bits, -N being the value specified in its type name. +.I 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 -.RB [ INT N _MIN , -.BR INT N _MAX ], -substituting N by the appropriate number. +.RB [ INT \fIN\fP _MIN , +.BR INT \fIN\fP _MAX ], +substituting +.I N +by the appropriate number. +.PP +.IR uint N _t +are +unsigned integer types +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, +.BR UINT \fIN\fP _MAX ], +substituting +.I N +by the appropriate number. .PP According to POSIX, -.IR int8_t , -.IR int16_t , +.RI [ u ] int8_t , +.RI [ u ] int16_t , and -.I int32_t +.RI [ u ] int32_t are required; -.I int64_t -is only required in implementations that provide integer types with width 64; +.RI [ u ] int64_t +are only required in implementations that provide integer types with width 64; and all other types of this form are optional. .PP The length modifiers for the -.IR int N _t +.RI [ u ] int N _t types for the .BR printf (3) family of functions are expanded by macros of the forms -.BR PRId N +.BR PRId \fIN\fP, +.BR PRIi \fIN\fP, +.BR PRIu \fIN\fP, and -.BR PRIi N +.BI PRIx N (defined in .IR <inttypes.h> ); resulting for example in
@@ -51,22 +75,24 @@ for printing .I int64_t values. The length modifiers for the -.IR int N _t +.RI [ u ] int N _t types for the .BR scanf (3) family of functions are expanded by macros of the forms -.BR SCNd N +.BR SCNd \fIN\fP, +.BR SCNi \fIN\fP, +.BR SCNu \fIN\fP, and -.BR SCNi N, +.BI SCNx N, (defined in .IR <inttypes.h> ); resulting for example in -.B %"SCNd8" +.B %"SCNu8" or -.B %"SCNi8" +.B %"SCNx8" for scanning -.I int8_t +.I uint8_t values. .PP .IR "Conforming to" :
man3/uint16_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/uint32_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/uint64_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/uint8_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man3/uintN_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/intN_t.3
man7/system_data_types.7 +0 -84
90 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 33/37 intN_t.3: Document the [U]INTN_* macros
In reply to Alejandro Colomar--- man3/intN_t.3 | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
man3/intN_t.3 +53 -0
@@ -16,6 +16,41 @@ uintN_t, uint8_t, uint16_t, uint32_t, uint64_t .BR typedef " /* ... */ " uint16_t; .BR typedef " /* ... */ " uint32_t; .BR typedef " /* ... */ " uint64_t; +.PP +.B "#define INT8_WIDTH 8" +.B "#define INT16_WIDTH 16" +.B "#define INT32_WIDTH 32" +.B "#define INT64_WIDTH 64" +.PP +.B "#define UINT8_WIDTH 8" +.B "#define UINT16_WIDTH 16" +.B "#define UINT32_WIDTH 32" +.B "#define UINT64_WIDTH 64" +.PP +.BR "#define INT8_MAX " "/* 2**(INT8_WIDTH - 1) - 1 */ +.BR "#define INT16_MAX " "/* 2**(INT16_WIDTH - 1) - 1 */ +.BR "#define INT32_MAX " "/* 2**(INT32_WIDTH - 1) - 1 */ +.BR "#define INT64_MAX " "/* 2**(INT64_WIDTH - 1) - 1 */ +.PP +.BR "#define INT8_MIN " "/* - 2**(INT8_WIDTH - 1) */ +.BR "#define INT16_MIN " "/* - 2**(INT16_WIDTH - 1) */ +.BR "#define INT32_MIN " "/* - 2**(INT32_WIDTH - 1) */ +.BR "#define INT64_MIN " "/* - 2**(INT64_WIDTH - 1) */ +.PP +.BR "#define UINT8_MAX " "/* 2**INT8_WIDTH - 1 */ +.BR "#define UINT16_MAX " "/* 2**INT16_WIDTH - 1 */ +.BR "#define UINT32_MAX " "/* 2**INT32_WIDTH - 1 */ +.BR "#define UINT64_MAX " "/* 2**INT64_WIDTH - 1 */ +.PP +.BI "#define INT8_C(" c ") " c " ## " "\fR/* ... */\fP" +.BI "#define INT16_C(" c ") " c " ## " "\fR/* ... */\fP" +.BI "#define INT32_C(" c ") " c " ## " "\fR/* ... */\fP" +.BI "#define INT64_C(" c ") " c " ## " "\fR/* ... */\fP" +.PP +.BI "#define UINT8_C(" c ") " c " ## " "\fR/* ... */\fP" +.BI "#define UINT16_C(" c ") " c " ## " "\fR/* ... */\fP" +.BI "#define UINT32_C(" c ") " c " ## " "\fR/* ... */\fP" +.BI "#define UINT64_C(" c ") " c " ## " "\fR/* ... */\fP" .fi .SH DESCRIPTION .IR int N _t
@@ -54,6 +89,24 @@ are required; are only required in implementations that provide integer types with width 64; and all other types of this form are optional. .PP +The macros +.RB [ U ] INT \fIN\fP _WIDTH W +expand to the width in bits of these types +.RI ( N ). +.PP +The macros +.RB [ U ] INT \fIN\fP _MAX +expand to the maximum value that these types can hold. +.PP +The macros +.BI INT N _MIN +expand to the minimum value that these types can hold. +.PP +The macros +.RB [ U ] INT \fIN\fP _C () +expand their argument to an integer constant of type +.RI [ u ] int N _t . +.PP The length modifiers for the .RI [ u ] int N _t types for the
Signature · 1 line
2.33.1
RFC 34/37 lconv-struct.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/lconv-struct.3 | 46 +++++++++++++++++++++++++++++++++++++- man7/system_data_types.7 | 48 ---------------------------------------- 2 files changed, 45 insertions(+), 49 deletions(-)
man3/lconv-struct.3 +45 -1
@@ -1 +1,45 @@ -.so man7/system_data_types.7 +.TH LCONV-STRUCT 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +struct lconv \- numeric formatting information +.SH SYNOPSIS +.nf +.B #include <locale.h> +.PP +.BR "struct lconv {" " /* Values in the \(dqC\(dq locale: */" +.BR " char *decimal_point;" " /* \(dq.\(dq */" +.BR " char *thousands_sep;" " /* \(dq\(dq */" +.BR " char *grouping;" " /* \(dq\(dq */" +.BR " char *mon_decimal_point;" " /* \(dq\(dq */" +.BR " char *mon_thousands_sep;" " /* \(dq\(dq */" +.BR " char *mon_grouping;" " /* \(dq\(dq */" +.BR " char *positive_sign;" " /* \(dq\(dq */" +.BR " char *negative_sign;" " /* \(dq\(dq */" +.BR " char *currency_symbol;" " /* \(dq\(dq */" +.BR " char frac_digits;" " /* CHAR_MAX */" +.BR " char p_cs_precedes;" " /* CHAR_MAX */" +.BR " char n_cs_precedes;" " /* CHAR_MAX */" +.BR " char p_sep_by_space;" " /* CHAR_MAX */" +.BR " char n_sep_by_space;" " /* CHAR_MAX */" +.BR " char p_sign_posn;" " /* CHAR_MAX */" +.BR " char n_sign_posn;" " /* CHAR_MAX */" +.BR " char *int_curr_symbol;" " /* \(dq\(dq */" +.BR " char int_frac_digits;" " /* CHAR_MAX */" +.BR " char int_p_cs_precedes;" " /* CHAR_MAX */" +.BR " char int_n_cs_precedes;" " /* CHAR_MAX */" +.BR " char int_p_sep_by_space;" " /* CHAR_MAX */" +.BR " char int_n_sep_by_space;" " /* CHAR_MAX */" +.BR " char int_p_sign_posn;" " /* CHAR_MAX */" +.BR " char int_n_sign_posn;" " /* CHAR_MAX */" +.B }; +.fi +.SH DESCRIPTION +Contains members related to the formatting of numeric values. +In the "C" locale, its members have the values +shown in the comments above. +.SH CONFORMING TO +C11 and later; POSIX.1-2001 and later. +.SH SEE ALSO +.BR setlocale (3), +.BR localeconv (3), +.BR charsets (7), +.BR locale (7)
man7/system_data_types.7 +0 -48
54 lines not on this page · raw message
Signature · 1 line
2.33.1
RFC 35/37 div_t.3, ldiv_t.3, system_data_types.7: Move ldiv_t to div_t.3
In reply to Alejandro Colomar--- man3/div_t.3 | 14 ++++++++++---- man3/ldiv_t.3 | 2 +- man7/system_data_types.7 | 23 ----------------------- 3 files changed, 11 insertions(+), 28 deletions(-)
man3/div_t.3 +10 -4
@@ -1,6 +1,6 @@ .TH DIV_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -div_t, imaxdiv_t \- quotient and remainder of an integer division +div_t, ldiv_t, imaxdiv_t \- quotient and remainder of an integer division .SH SYNOPSIS .nf .B #include <stdlib.h>
@@ -10,6 +10,11 @@ div_t, imaxdiv_t \- quotient and remainder of an integer division .BR " int rem;" " /* Remainder */" .B } div_t; .PP +.B typedef struct { +.BR " long quot;" " /* Quotient */" +.BR " long rem;" " /* Remainder */" +.B } ldiv_t; +.PP .B #include <inttypes.h> .PP .B typedef struct {
@@ -18,9 +23,9 @@ div_t, imaxdiv_t \- quotient and remainder of an integer division .B } imaxdiv_t; .fi .SH DESCRIPTION -.I div_t +.RI [ l ] div_t is the type of the value returned by the -.BR div (3) +.RB [ l ] div (3) function. .PP .I imaxdiv_t
@@ -31,4 +36,5 @@ function. C99 and later; POSIX.1-2001 and later. .SH SEE ALSO .BR div (3), -.BR imaxdiv (3) +.BR imaxdiv (3), +.BR ldiv (3)
man3/ldiv_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/div_t.3
man7/system_data_types.7 +0 -23
@@ -136,29 +136,6 @@ types in this page. .RE .\"------------------------------------- lconv ------------------------/ .\"------------------------------------- ldiv_t -----------------------/ -.TP -.I ldiv_t -.RS -.IR Include : -.IR <stdlib.h> . -.PP -.EX -typedef struct { - long quot; /* Quotient */ - long rem; /* Remainder */ -} ldiv_t; -.EE -.PP -It is the type of the value returned by the -.BR ldiv (3) -function. -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR ldiv (3) -.RE .\"------------------------------------- lldiv_t ----------------------/ .TP .I lldiv_t
Signature · 1 line
2.33.1
RFC 36/37 div_t.3, lldiv_t.3, system_data_types.7: Move lldiv_t to div_t.3
In reply to Alejandro Colomar--- man3/div_t.3 | 14 ++++++++++---- man3/lldiv_t.3 | 2 +- man7/system_data_types.7 | 23 ----------------------- 3 files changed, 11 insertions(+), 28 deletions(-)
man3/div_t.3 +10 -4
@@ -1,6 +1,6 @@ .TH DIV_T 3 2021-11-02 Linux "Linux Programmer's Manual" .SH NAME -div_t, ldiv_t, imaxdiv_t \- quotient and remainder of an integer division +div_t, ldiv_t, lldiv_t, imaxdiv_t \- quotient and remainder of an integer division .SH SYNOPSIS .nf .B #include <stdlib.h>
@@ -15,6 +15,11 @@ div_t, ldiv_t, imaxdiv_t \- quotient and remainder of an integer division .BR " long rem;" " /* Remainder */" .B } ldiv_t; .PP +.B typedef struct { +.BR " long long quot;" " /* Quotient */" +.BR " long long rem;" " /* Remainder */" +.B } lldiv_t; +.PP .B #include <inttypes.h> .PP .B typedef struct {
@@ -23,9 +28,9 @@ div_t, ldiv_t, imaxdiv_t \- quotient and remainder of an integer division .B } imaxdiv_t; .fi .SH DESCRIPTION -.RI [ l ] div_t +.RI [[ l ] l ] div_t is the type of the value returned by the -.RB [ l ] div (3) +.RB [[ l ] l ] div (3) function. .PP .I imaxdiv_t
@@ -37,4 +42,5 @@ C99 and later; POSIX.1-2001 and later. .SH SEE ALSO .BR div (3), .BR imaxdiv (3), -.BR ldiv (3) +.BR ldiv (3), +.BR lldiv (3)
man3/lldiv_t.3 +1 -1
@@ -1 +1 @@ -.so man7/system_data_types.7 +.so man3/div_t.3
man7/system_data_types.7 +0 -23
@@ -137,29 +137,6 @@ types in this page. .\"------------------------------------- lconv ------------------------/ .\"------------------------------------- ldiv_t -----------------------/ .\"------------------------------------- lldiv_t ----------------------/ -.TP -.I lldiv_t -.RS -.IR Include : -.IR <stdlib.h> . -.PP -.EX -typedef struct { - long long quot; /* Quotient */ - long long rem; /* Remainder */ -} lldiv_t; -.EE -.PP -It is the type of the value returned by the -.BR lldiv (3) -function. -.PP -.IR "Conforming to" : -C99 and later; POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR lldiv (3) -.RE .\"------------------------------------- mode_t -----------------------/ .TP .I mode_t
Signature · 1 line
2.33.1
RFC 37/37 mode_t.3, system_data_types.7: Move text to a separate page
In reply to Alejandro Colomar--- man3/mode_t.3 | 32 +++++++++++++++++++++++++++++++- man7/system_data_types.7 | 32 -------------------------------- 2 files changed, 31 insertions(+), 33 deletions(-)
man3/mode_t.3 +31 -1
@@ -1 +1,31 @@ -.so man7/system_data_types.7 +.TH MODE_T 3 2021-11-02 Linux "Linux Programmer's Manual" +.SH NAME +mode_t \- file attributes +.SH SYNOPSIS +.nf +.B #include <sys/types.h> +.PP +.BR typedef " /* ... */ " mode_t; +.fi +.SH DESCRIPTION +Used for some file attributes (e.g., file mode). +According to POSIX, +it shall be an integer type. +.SH CONFORMING TO +POSIX.1-2001 and later. +.SH NOTES +The following headers also provide this type: +.IR <fcntl.h> , +.IR <ndbm.h> , +.IR <spawn.h> , +.IR <sys/ipc.h> , +.IR <sys/mman.h> , +and +.IR <sys/stat.h> . +.PP +.SH SEE ALSO +.BR chmod (2), +.BR mkdir (2), +.BR open (2), +.BR umask (2), +.BR stat-struct (3)
man7/system_data_types.7 +0 -32
@@ -138,38 +138,6 @@ types in this page. .\"------------------------------------- ldiv_t -----------------------/ .\"------------------------------------- lldiv_t ----------------------/ .\"------------------------------------- mode_t -----------------------/ -.TP -.I mode_t -.RS -.IR Include : -.IR <sys/types.h> . -Alternatively, -.IR <fcntl.h> , -.IR <ndbm.h> , -.IR <spawn.h> , -.IR <sys/ipc.h> , -.IR <sys/mman.h> , -or -.IR <sys/stat.h> . -.PP -Used for some file attributes (e.g., file mode). -According to POSIX, -it shall be an integer type. -.PP -.IR "Conforming to" : -POSIX.1-2001 and later. -.PP -.IR "See also" : -.BR chmod (2), -.BR mkdir (2), -.BR open (2), -.BR umask (2) -.PP -.IR "See also" : -the -.I stat -structure in this page. -.RE .\"------------------------------------- off64_t ----------------------/ .TP .I off64_t
Signature · 1 line
2.33.1