public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Don't check HAVE_UNISTD_H
Date: Fri, 28 Sep 2018 21:03:00 -0000	[thread overview]
Message-ID: <16c73f13334db79a79336131b423d1ca@polymtl.ca> (raw)
In-Reply-To: <20180926113141.21219-1-tom@tromey.com>

On 2018-09-26 07:31, Tom Tromey wrote:
> I noticed some spots that were checking HAVE_UNISTD_H.  There is no
> need to do this, as <unistd.h> is unconditionally included in many
> places in gdb.  This sort of cleanup was done once before, in 2013:
> 
>     2013-07-01  Pedro Alves  <palves@redhat.com>
> 
> 	    * defs.h: Don't check HAVE_UNISTD_H before including <unistd.h>.
> 	    (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Delete.
> 	    * tracepoint.c: Don't check HAVE_UNISTD_H before including
> 	    <unistd.h>.
> 
> HAVE_UNISTD_H seems to come from gnulib, so there are still mentions
> of it in the source.

LGTM.  Maybe we could even remove all includes of unistd.h except the 
one in defs.h, since defs.h is known to be included first in every 
source file.  But they are harmless so it's probably not worth the 
effort.

Simon

  reply	other threads:[~2018-09-28 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26 11:32 Tom Tromey
2018-09-28 21:03 ` Simon Marchi [this message]
2018-10-01 15:33   ` Tom Tromey

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=16c73f13334db79a79336131b423d1ca@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).