public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <colomar.6.4.3@gmail.com>
To: mtk.manpages@gmail.com
Cc: linux-man@vger.kernel.org, Alejandro Colomar <colomar.6.4.3@gmail.com>
Subject: [PATCH] regex.3: Remove unnecessary include
Date: Sat, 10 Oct 2020 19:50:02 +0200	[thread overview]
Message-ID: <20201010175001.3818-1-colomar.6.4.3@gmail.com> (raw)

POSIX requires that the <regex.h> header shall define
the structures and symbolic constants used by the
regcomp(),  regexec(), regerror(), and regfree() functions.

Therefore, there should be no need to include <sys/types.h> at all.

The POSIX docs don't use that include:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/regcomp.html

Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
---
 man3/regex.3 | 1 -
 1 file changed, 1 deletion(-)

diff --git a/man3/regex.3 b/man3/regex.3
index d4f7a09e7..414011d91 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -32,7 +32,6 @@
 regcomp, regexec, regerror, regfree \- POSIX regex functions
 .SH SYNOPSIS
 .nf
-.B #include <sys/types.h>
 .B #include <regex.h>
 .PP
 .BI "int regcomp(regex_t *" preg ", const char *" regex ", int " cflags );
-- 
2.28.0


             reply	other threads:[~2020-10-10 23:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-10 17:50 Alejandro Colomar [this message]
2020-10-10 18:10 ` [PATCH] regex.3: Remove unnecessary include Alejandro Colomar
2020-10-11  5:44   ` Michael Kerrisk (man-pages)
2020-10-11  5:43 ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201010175001.3818-1-colomar.6.4.3@gmail.com \
    --to=colomar.6.4.3@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox