* Add symcat file.
	* libiberty.h expose basename prototype on more systems

From-SVN: r26238
This commit is contained in:
Jeff Law 1999-04-06 22:24:20 -06:00
parent 9c0225173d
commit 64f62168ef
3 changed files with 49 additions and 1 deletions

View File

@ -6,6 +6,10 @@
* splay-tree.h (splay_tree_compare_ints): Declare.
Wed Mar 24 12:46:29 1999 Andrew Cagney <cagney@amy.cygnus.com>
* libiberty.h (basename): Cygwin{,32} should have the prototype.
Mon Dec 14 09:53:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* demangle.h: Don't check IN_GCC anymore.
@ -26,6 +30,10 @@ Tue Dec 8 00:30:31 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
(ARM_DEMANGLING): coerce to int.
(HP_DEMANGLING): new macro.
Fri Nov 20 13:14:00 1998 Andrew Cagney <cagney@b1.cygnus.com>
* libiberty.h (basename): Add prototype for FreeBSD.
Fri Nov 13 19:19:11 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* libiberty.h: Prototype xcalloc.

View File

@ -36,7 +36,7 @@ extern char **dupargv PARAMS ((char **));
across different systems, sometimes as "char *" and sometimes as
"const char *" */
#if defined(__GNU_LIBRARY__ ) || defined (__linux__)
#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__)
extern char *basename PARAMS ((const char *));
#else
extern char *basename ();

40
include/symcat.h Normal file
View File

@ -0,0 +1,40 @@
/* Symbol concatenation utilities.
Copyright (C) 1998, Free Software Foundation, Inc.
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. */
#ifndef SYM_CAT_H
#define SYM_CAT_H
#if defined (__STDC__) || defined (ALMOST_STDC)
#define CONCAT2(a,b) a##b
#define CONCAT3(a,b,c) a##b##c
#define CONCAT4(a,b,c,d) a##b##c##d
#define STRINGX(s) #s
#else
#define CONCAT2(a,b) a/**/b
#define CONCAT3(a,b,c) a/**/b/**/c
#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
#define STRINGX(s) "?"
#endif
#define XCONCAT2(a,b) CONCAT2(a,b)
#define XCONCAT3(a,b,c) CONCAT3(a,b,c)
#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d)
#define XSTRING(s) STRINGX(s)
#endif SYM_CAT_H