X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fgen-aout.c;h=45331e0c813abf9c3d95c4ba501f296d375b9974;hb=3d3e6bc3f438c51ff235d6a454ee1010246e814a;hp=088fc09152e7092e7c51ef3be7f43fbaa2d6336e;hpb=7898dedac0f0bd75d7363d13427c4a1e72b66f66;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/gen-aout.c b/bfd/gen-aout.c index 088fc09152..45331e0c81 100644 --- a/bfd/gen-aout.c +++ b/bfd/gen-aout.c @@ -1,26 +1,31 @@ /* Generate parameters for an a.out system. - Copyright 1990, 1991, 1992, 1993, 1994, 1995 + Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2002, 2005, 2007 Free Software Foundation, Inc. -This file is part of BFD, the Binary File Descriptor library. + This file is part of BFD, the Binary File Descriptor library. -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 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 3 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. + 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. */ + 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., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ #include "/usr/include/a.out.h" #include +#ifndef _ +#define _(X) X +#endif + int main (argc, argv) int argc; char** argv; @@ -87,13 +92,16 @@ main (argc, argv) fprintf (stderr, _(" fix DEFAULT_ARCH in the output file yourself\n")); arch = "unknown"; } - printf("#define DEFAULT_ARCH bfd_arch_%s\n", arch); + printf("#define DEFAULT_ARCH bfd_arch_%s\n\n", arch); - printf("\n#define MY(OP) CAT(%s_,OP)\n", target); + printf("/* Do not \"beautify\" the CONCAT* macro args. Traditional C will not"); + printf(" remove whitespace added here, and thus will fail to concatenate"); + printf(" the tokens. */"); + printf("\n#define MY(OP) CONCAT2 (%s_,OP)\n\n", target); printf("#define TARGETNAME \"a.out-%s\"\n\n", target); - printf("#include \"bfd.h\"\n"); printf("#include \"sysdep.h\"\n"); + printf("#include \"bfd.h\"\n"); printf("#include \"libbfd.h\"\n"); printf("#include \"libaout.h\"\n"); printf("\n#include \"aout-target.h\"\n");