From bb8b9d4cd9592c3bafdc0c84702d27fbe166980e Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Thu, 22 May 2003 14:12:25 +0000 Subject: [PATCH] 2003-05-22 Marcel Telka * config.h: New file. Changed all relevant source files to include this file unconditionaly. * Makefile.am (noinst_HEADERS): Added config.h. * configure.ac (AM_CONFIG_HEADER): Renamed generated configuration file from config.h to acconfig.h. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@440 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/.cvsignore | 4 ++-- jtag/ChangeLog | 8 +++++++ jtag/Makefile.am | 3 +++ jtag/config.h | 41 +++++++++++++++++++++++++++++++++++ jtag/configure.ac | 2 +- jtag/src/bus/ixp425.c | 7 ------ jtag/src/bus/pxa2x0.c | 7 ------ jtag/src/bus/sa1110.c | 7 ------ jtag/src/cmd/cable.c | 7 ------ jtag/src/cmd/cmd.c | 7 ------ jtag/src/cmd/detect.c | 7 ------ jtag/src/cmd/detectflash.c | 7 ------ jtag/src/cmd/discovery.c | 7 ------ jtag/src/cmd/dr.c | 7 ------ jtag/src/cmd/endian.c | 7 ------ jtag/src/cmd/flashmem.c | 7 ------ jtag/src/cmd/frequency.c | 7 ------ jtag/src/cmd/get.c | 7 ------ jtag/src/cmd/help.c | 7 ------ jtag/src/cmd/instruction.c | 7 ------ jtag/src/cmd/print.c | 7 ------ jtag/src/cmd/quit.c | 7 ------ jtag/src/cmd/readmem.c | 7 ------ jtag/src/cmd/script.c | 7 ------ jtag/src/cmd/set.c | 7 ------ jtag/src/cmd/shift.c | 7 ------ jtag/src/discovery.c | 2 -- jtag/src/jtag.c | 7 ------ jtag/src/lib/getdelim.c | 6 ++--- jtag/src/lib/getline.c | 6 ++--- jtag/src/part/data_register.c | 7 ------ jtag/src/part/instruction.c | 7 ------ jtag/src/part/parse.c | 7 ------ jtag/src/part/part.c | 7 ------ jtag/src/readmem.c | 7 ------ jtag/src/tap/cable.c | 2 -- jtag/src/tap/chain.c | 7 ------ jtag/src/tap/parport.c | 2 -- jtag/src/tap/parport/direct.c | 7 ------ jtag/src/tap/parport/ppdev.c | 7 ------ jtag/src/tap/tap.c | 7 ------ 41 files changed, 59 insertions(+), 234 deletions(-) create mode 100644 jtag/config.h diff --git a/jtag/.cvsignore b/jtag/.cvsignore index b70b519b..279334b2 100644 --- a/jtag/.cvsignore +++ b/jtag/.cvsignore @@ -10,6 +10,6 @@ COPYING INSTALL ABOUT-NLS m4 -config.h -config.h.in +acconfig.h +acconfig.h.in stamp-h1 diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 75c0f36a..47cbb57e 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,11 @@ +2003-05-22 Marcel Telka + + * config.h: New file. + Changed all relevant source files to include this file unconditionaly. + * Makefile.am (noinst_HEADERS): Added config.h. + * configure.ac (AM_CONFIG_HEADER): Renamed generated configuration file + from config.h to acconfig.h. + 2003-05-22 Marcel Telka * src/jtag.c: Added new global variable 'big_endian'. diff --git a/jtag/Makefile.am b/jtag/Makefile.am index aa15e679..144cd5a9 100644 --- a/jtag/Makefile.am +++ b/jtag/Makefile.am @@ -30,6 +30,9 @@ SUBDIRS = \ src \ po +noinst_HEADERS = \ + config.h + EXTRA_DIST = \ Makefile.rules diff --git a/jtag/config.h b/jtag/config.h new file mode 100644 index 00000000..57fc10c1 --- /dev/null +++ b/jtag/config.h @@ -0,0 +1,41 @@ +/* + * $Id$ + * + * Copyright (C) 2003 ETC s.r.o. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Written by Marcel Telka , 2003. + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "gettext.h" +#define _(s) gettext(s) +#define N_(s) gettext_noop(s) +#define P_(s,p,n) ngettext(s,p,n) + +#ifdef S_SPLINT_S +#undef gettext +#define gettext(s) s +#undef gettext_noop +#define gettext_noop(s) s +#undef ngettext +#define ngettext(s,p,n) s +#endif diff --git a/jtag/configure.ac b/jtag/configure.ac index ed23872e..9870b634 100644 --- a/jtag/configure.ac +++ b/jtag/configure.ac @@ -48,7 +48,7 @@ AC_CONFIG_FILES( AM_MAINTAINER_MODE -AM_CONFIG_HEADER(config.h) +AM_CONFIG_HEADER(acconfig.h) AC_GNU_SOURCE diff --git a/jtag/src/bus/ixp425.c b/jtag/src/bus/ixp425.c index ac11931c..31742db2 100644 --- a/jtag/src/bus/ixp425.c +++ b/jtag/src/bus/ixp425.c @@ -23,14 +23,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/bus/pxa2x0.c b/jtag/src/bus/pxa2x0.c index 321d0328..34396fc4 100644 --- a/jtag/src/bus/pxa2x0.c +++ b/jtag/src/bus/pxa2x0.c @@ -26,14 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/bus/sa1110.c b/jtag/src/bus/sa1110.c index a313536d..22c56da2 100644 --- a/jtag/src/bus/sa1110.c +++ b/jtag/src/bus/sa1110.c @@ -26,14 +26,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/cable.c b/jtag/src/cmd/cable.c index 9b43dba4..d68f6093 100644 --- a/jtag/src/cmd/cable.c +++ b/jtag/src/cmd/cable.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/cmd.c b/jtag/src/cmd/cmd.c index 89006f9f..884fd3f6 100644 --- a/jtag/src/cmd/cmd.c +++ b/jtag/src/cmd/cmd.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/detect.c b/jtag/src/cmd/detect.c index a0b95ab4..faed7ff7 100644 --- a/jtag/src/cmd/detect.c +++ b/jtag/src/cmd/detect.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/detectflash.c b/jtag/src/cmd/detectflash.c index a9c61555..9b761f15 100644 --- a/jtag/src/cmd/detectflash.c +++ b/jtag/src/cmd/detectflash.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/cmd/discovery.c b/jtag/src/cmd/discovery.c index 7612249b..0b626884 100644 --- a/jtag/src/cmd/discovery.c +++ b/jtag/src/cmd/discovery.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/cmd/dr.c b/jtag/src/cmd/dr.c index 57ea9dc4..dd333d59 100644 --- a/jtag/src/cmd/dr.c +++ b/jtag/src/cmd/dr.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/endian.c b/jtag/src/cmd/endian.c index 99527033..390c75ed 100644 --- a/jtag/src/cmd/endian.c +++ b/jtag/src/cmd/endian.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/flashmem.c b/jtag/src/cmd/flashmem.c index 9bbce86f..5e63a528 100644 --- a/jtag/src/cmd/flashmem.c +++ b/jtag/src/cmd/flashmem.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/frequency.c b/jtag/src/cmd/frequency.c index 4085e3ba..27660479 100644 --- a/jtag/src/cmd/frequency.c +++ b/jtag/src/cmd/frequency.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/cmd/get.c b/jtag/src/cmd/get.c index 6364952e..f76305d2 100644 --- a/jtag/src/cmd/get.c +++ b/jtag/src/cmd/get.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/help.c b/jtag/src/cmd/help.c index 4c4aec4d..a6e03e4d 100644 --- a/jtag/src/cmd/help.c +++ b/jtag/src/cmd/help.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/instruction.c b/jtag/src/cmd/instruction.c index d65c4055..aae49df0 100644 --- a/jtag/src/cmd/instruction.c +++ b/jtag/src/cmd/instruction.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/cmd/print.c b/jtag/src/cmd/print.c index f2201e20..4d77d16e 100644 --- a/jtag/src/cmd/print.c +++ b/jtag/src/cmd/print.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/cmd/quit.c b/jtag/src/cmd/quit.c index c492336e..9b4084b2 100644 --- a/jtag/src/cmd/quit.c +++ b/jtag/src/cmd/quit.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/cmd/readmem.c b/jtag/src/cmd/readmem.c index 3641423a..d83081ac 100644 --- a/jtag/src/cmd/readmem.c +++ b/jtag/src/cmd/readmem.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/script.c b/jtag/src/cmd/script.c index 7b733f9b..77fac0b8 100644 --- a/jtag/src/cmd/script.c +++ b/jtag/src/cmd/script.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/cmd/set.c b/jtag/src/cmd/set.c index 18b1f57b..7b371030 100644 --- a/jtag/src/cmd/set.c +++ b/jtag/src/cmd/set.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/cmd/shift.c b/jtag/src/cmd/shift.c index d0c974ec..5489cbc7 100644 --- a/jtag/src/cmd/shift.c +++ b/jtag/src/cmd/shift.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/discovery.c b/jtag/src/discovery.c index f025eb1e..63111ba5 100644 --- a/jtag/src/discovery.c +++ b/jtag/src/discovery.c @@ -22,9 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif #include #include diff --git a/jtag/src/jtag.c b/jtag/src/jtag.c index 30a3da18..19ffb6c7 100644 --- a/jtag/src/jtag.c +++ b/jtag/src/jtag.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/lib/getdelim.c b/jtag/src/lib/getdelim.c index 99765cb1..734c414e 100644 --- a/jtag/src/lib/getdelim.c +++ b/jtag/src/lib/getdelim.c @@ -22,14 +22,12 @@ * */ +#include + #include #include #include -#ifdef HAVE_CONFIG_H -#include -#endif - #ifndef HAVE_GETDELIM #define GETDELIM_BUFFER 128 diff --git a/jtag/src/lib/getline.c b/jtag/src/lib/getline.c index 2cef736f..9c2289e6 100644 --- a/jtag/src/lib/getline.c +++ b/jtag/src/lib/getline.c @@ -22,13 +22,11 @@ * */ +#include + #include #include -#ifdef HAVE_CONFIG_H -#include -#endif - #ifndef HAVE_GETLINE #ifndef HAVE_GETDELIM diff --git a/jtag/src/part/data_register.c b/jtag/src/part/data_register.c index 09cb07f9..a657d266 100644 --- a/jtag/src/part/data_register.c +++ b/jtag/src/part/data_register.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/part/instruction.c b/jtag/src/part/instruction.c index 7acfb4af..149d1669 100644 --- a/jtag/src/part/instruction.c +++ b/jtag/src/part/instruction.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/part/parse.c b/jtag/src/part/parse.c index 0691937b..ad8a4813 100644 --- a/jtag/src/part/parse.c +++ b/jtag/src/part/parse.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/part/part.c b/jtag/src/part/part.c index c62505fd..04061b71 100644 --- a/jtag/src/part/part.c +++ b/jtag/src/part/part.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/readmem.c b/jtag/src/readmem.c index 79221ace..d2961f33 100644 --- a/jtag/src/readmem.c +++ b/jtag/src/readmem.c @@ -28,14 +28,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/tap/cable.c b/jtag/src/tap/cable.c index 8cd7837c..ef650abd 100644 --- a/jtag/src/tap/cable.c +++ b/jtag/src/tap/cable.c @@ -22,9 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif #include #include diff --git a/jtag/src/tap/chain.c b/jtag/src/tap/chain.c index c46e1de9..97fdab72 100644 --- a/jtag/src/tap/chain.c +++ b/jtag/src/tap/chain.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include diff --git a/jtag/src/tap/parport.c b/jtag/src/tap/parport.c index 3a805127..8df56887 100644 --- a/jtag/src/tap/parport.c +++ b/jtag/src/tap/parport.c @@ -22,9 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif #include "parport.h" diff --git a/jtag/src/tap/parport/direct.c b/jtag/src/tap/parport/direct.c index 1b88d137..4d6121b1 100644 --- a/jtag/src/tap/parport/direct.c +++ b/jtag/src/tap/parport/direct.c @@ -24,14 +24,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include #include diff --git a/jtag/src/tap/parport/ppdev.c b/jtag/src/tap/parport/ppdev.c index 3e47abd6..310cc30d 100644 --- a/jtag/src/tap/parport/ppdev.c +++ b/jtag/src/tap/parport/ppdev.c @@ -23,17 +23,10 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif #ifdef HAVE_LINUX_PPDEV_H -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) - #include #include #include diff --git a/jtag/src/tap/tap.c b/jtag/src/tap/tap.c index b9f6c9cd..99ba1225 100644 --- a/jtag/src/tap/tap.c +++ b/jtag/src/tap/tap.c @@ -22,14 +22,7 @@ * */ -#ifdef HAVE_CONFIG_H #include -#endif - -#include "gettext.h" -#define _(s) gettext(s) -#define N_(s) gettext_noop(s) -#define P_(s,p,n) ngettext(s,p,n) #include