"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: Stop including <sys/syslimits.h>
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 11 Sep 2020 20:42:19 +0200

Download raw body.

Thread
On Fri, Sep 11, 2020 at 07:37:31PM +0200, Christian Weisgerber wrote:
> Stop including <sys/syslimits.h> directly.  POSIX says the limits
> defined there are available from <limits.h>, which almost all
> affected source files already included anyway.
> 
> OK?

Yes, thanks!

> I don't know where the idea to include <sys/syslimits.h> came from.
> Not from the man pages, which mention it exactly once:
> 
> $ apropos In=syslimits.h
> __tfork_thread, __tfork(3) - create a new kernel thread in the current
> process

This was probably just me grepping through header files to locate
the definition of PATH_MAX. I didn't cross-check with POSIX.

> diff 1601cb9fb1c61348022d15d2f34797672e2c3cc3 /home/naddy/got
> blob - 057287fe2e3af2b2946dd2b22aa97981474ed83a
> file + lib/fetch.c
> --- lib/fetch.c
> +++ lib/fetch.c
> @@ -20,7 +20,6 @@
>  #include <sys/uio.h>
>  #include <sys/socket.h>
>  #include <sys/wait.h>
> -#include <sys/syslimits.h>
>  #include <sys/resource.h>
>  #include <sys/socket.h>
>  
> blob - f0c9b0540b81bbfe6b0a9340e4321d356fa3b173
> file + lib/object.c
> --- lib/object.c
> +++ lib/object.c
> @@ -20,7 +20,6 @@
>  #include <sys/uio.h>
>  #include <sys/socket.h>
>  #include <sys/wait.h>
> -#include <sys/syslimits.h>
>  #include <sys/resource.h>
>  
>  #include <errno.h>
> blob - 25e255c01bc3216b952b7725a75edfd91082184c
> file + lib/object_parse.c
> --- lib/object_parse.c
> +++ lib/object_parse.c
> @@ -19,7 +19,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/socket.h>
> -#include <sys/syslimits.h>
>  #include <sys/wait.h>
>  
>  #include <errno.h>
> blob - 7b91a1fa25baa5c2540acbd93a00945faba221c5
> file + lib/privsep.c
> --- lib/privsep.c
> +++ lib/privsep.c
> @@ -18,10 +18,10 @@
>  #include <sys/types.h>
>  #include <sys/queue.h>
>  #include <sys/uio.h>
> -#include <sys/syslimits.h>
>  #include <sys/wait.h>
>  
>  #include <ctype.h>
> +#include <limits.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> blob - 803b58014d1ed3dce991365b1c035c4c54f45af9
> file + lib/repository.c
> --- lib/repository.c
> +++ lib/repository.c
> @@ -20,7 +20,6 @@
>  #include <sys/socket.h>
>  #include <sys/stat.h>
>  #include <sys/mman.h>
> -#include <sys/syslimits.h>
>  
>  #include <ctype.h>
>  #include <endian.h>
> blob - 13359170cae7a6569ded8e800c1dd0a2e40fc048
> file + libexec/got-fetch-pack/got-fetch-pack.c
> --- libexec/got-fetch-pack/got-fetch-pack.c
> +++ libexec/got-fetch-pack/got-fetch-pack.c
> @@ -19,7 +19,6 @@
>  #include <sys/uio.h>
>  #include <sys/time.h>
>  #include <sys/stat.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <errno.h>
> blob - 45ca78c3e3b57ae16f0958484e421aa77db6b614
> file + libexec/got-index-pack/got-index-pack.c
> --- libexec/got-index-pack/got-index-pack.c
> +++ libexec/got-index-pack/got-index-pack.c
> @@ -17,7 +17,6 @@
>  
>  #include <sys/queue.h>
>  #include <sys/stat.h>
> -#include <sys/syslimits.h>
>  #include <sys/time.h>
>  #include <sys/types.h>
>  #include <sys/uio.h>
> blob - bba85784688f2b972d035843f4448f909181a9f9
> file + libexec/got-read-blob/got-read-blob.c
> --- libexec/got-read-blob/got-read-blob.c
> +++ libexec/got-read-blob/got-read-blob.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <imsg.h>
> blob - 460c4d0a3ee297c59330225e48873be109e69e20
> file + libexec/got-read-commit/got-read-commit.c
> --- libexec/got-read-commit/got-read-commit.c
> +++ libexec/got-read-commit/got-read-commit.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <imsg.h>
> blob - f5c9c175bcbc8acac1ce7972dbda9eca23507379
> file + libexec/got-read-gitconfig/got-read-gitconfig.c
> --- libexec/got-read-gitconfig/got-read-gitconfig.c
> +++ libexec/got-read-gitconfig/got-read-gitconfig.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <imsg.h>
> blob - 4d94535e57af6301b62b7f129ed69283e46898d2
> file + libexec/got-read-gotconfig/got-read-gotconfig.c
> --- libexec/got-read-gotconfig/got-read-gotconfig.c
> +++ libexec/got-read-gotconfig/got-read-gotconfig.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <imsg.h>
> blob - 1cd9052d22c72765b66923bc090fce958e175426
> file + libexec/got-read-object/got-read-object.c
> --- libexec/got-read-object/got-read-object.c
> +++ libexec/got-read-object/got-read-object.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <imsg.h>
> blob - 9e6ab362a1bc90a56dbea0d2a5506bda4f57067f
> file + libexec/got-read-pack/got-read-pack.c
> --- libexec/got-read-pack/got-read-pack.c
> +++ libexec/got-read-pack/got-read-pack.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  #include <sys/mman.h>
>  
>  #include <limits.h>
> blob - 12939c8165c21b94777a7ecaa255d6628fc0cafe
> file + libexec/got-read-tag/got-read-tag.c
> --- libexec/got-read-tag/got-read-tag.c
> +++ libexec/got-read-tag/got-read-tag.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <imsg.h>
> blob - 95aa84b130581da9e2cc4f2525794758b1e5e338
> file + libexec/got-read-tree/got-read-tree.c
> --- libexec/got-read-tree/got-read-tree.c
> +++ libexec/got-read-tree/got-read-tree.c
> @@ -18,7 +18,6 @@
>  #include <sys/queue.h>
>  #include <sys/uio.h>
>  #include <sys/time.h>
> -#include <sys/syslimits.h>
>  
>  #include <stdint.h>
>  #include <imsg.h>
> -- 
> Christian "naddy" Weisgerber                          naddy@mips.inka.de
> 
>