This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/3 v4] Introduce common/errors.h
- From: Pedro Alves <palves at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>, gdb-patches at sourceware dot org
- Cc: Doug Evans <dje at google dot com>, Tom Tromey <tromey at redhat dot com>
- Date: Thu, 24 Jul 2014 14:08:14 +0100
- Subject: Re: [PATCH 1/3 v4] Introduce common/errors.h
- Authentication-results: sourceware.org; auth=none
- References: <1406206287-6817-1-git-send-email-gbenson at redhat dot com> <1406206287-6817-2-git-send-email-gbenson at redhat dot com>
On 07/24/2014 01:51 PM, Gary Benson wrote:
> gdb/
> 2014-07-24 Tom Tromey <tromey@redhat.com>
> Gary Benson <gbenson@redhat.com>
>
> * common/errors.h: New file.
> * common/errors.c: Likewise.
> * Makefile.in (HFILES_NO_SRCDIR) [common/errors.h]:
> New header.
> (COMMON_OBS) [errors.o]: New object file.
Write:
(COMMON_OBS): Add errors.o.
[] has a specific meaning that is not what you're doing here. See:
https://www.gnu.org/prep/standards/html_node/Conditional-Changes.html#Conditional-Changes
> (errors.o): New rule.
> * utils.h: Include errors.h.
> (perror_with_name, error, verror, warning, vwarning):
> Don't declare.
> * common/common-utils.h: Include errors.h.
> (malloc_failure, internal_error): Don't declare.
>
> gdb/gdbserver/
> 2014-07-24 Tom Tromey <tromey@redhat.com>
> Gary Benson <gbenson@redhat.com>
>
> * Makefile.in (SFILES) [common/errors.c]: New sourcefile.
> (OBS) [errors.o]: New object file.
> (IPA_OBS) [errors-ipa.o]: Likewise.
Likewise.
> + You should have received a copy of the GNU General Public License
> + along with this program. If not, see <http://www.gnu.org/licenses/>. */
> +
> +#include "config.h"
Sorry for the push back, but it's wrong to only include "config.h".
We need to include gnulib's config.h everywhere too. I think
the best is to add a central common header that handles that
detail first.
--
Thanks,
Pedro Alves