This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3 v4] Introduce common/errors.h


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]