aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1999-04-06 22:24:20 -0600
committerJeff Law <law@gcc.gnu.org>1999-04-06 22:24:20 -0600
commit64f62168ef931afaa0a57fadf9b4410cadcbe249 (patch)
tree6e6cc6a956154ca32ba5d6f69e0eeaf4c817e7e2
parent9c0225173d2978616b1bc9c18f2be39f054a4b98 (diff)
downloadgcc-64f62168ef931afaa0a57fadf9b4410cadcbe249.zip
gcc-64f62168ef931afaa0a57fadf9b4410cadcbe249.tar.gz
gcc-64f62168ef931afaa0a57fadf9b4410cadcbe249.tar.bz2
Sync
* Add symcat file. * libiberty.h expose basename prototype on more systems From-SVN: r26238
-rw-r--r--include/ChangeLog8
-rw-r--r--include/libiberty.h2
-rw-r--r--include/symcat.h40
3 files changed, 49 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 5f53829d..120fb2a 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -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.
diff --git a/include/libiberty.h b/include/libiberty.h
index 86fec2d..cf31366 100644
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -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 ();
diff --git a/include/symcat.h b/include/symcat.h
new file mode 100644
index 0000000..01efada
--- /dev/null
+++ b/include/symcat.h
@@ -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