diff options
author | Manoj Srivastava <srivasta@debian.org> | 2008-05-30 14:15:43 -0500 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2008-05-30 14:15:43 -0500 |
commit | d902bed25e446508e9dcbe84001f738e77dd1979 (patch) | |
tree | 378d1e978b67c2c78904a81b454d303def969a97 /mcon/U/Csym.U | |
parent | 13da8069e56806306f6b42e2af5f03e89a835083 (diff) | |
parent | 6ed168ff814db8f9bcaad6f2e218fb2bbacbdb1c (diff) |
Merge branch 'upstream'
Conflicts:
jmake/files/Jmake.rules
mcon/U/Chk_MANI.U
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
Diffstat (limited to 'mcon/U/Csym.U')
-rw-r--r-- | mcon/U/Csym.U | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mcon/U/Csym.U b/mcon/U/Csym.U index 0b0bd2c..e7c7c4b 100644 --- a/mcon/U/Csym.U +++ b/mcon/U/Csym.U @@ -1,12 +1,12 @@ -?RCS: $Id: Csym.U,v 3.0.1.4 1995/07/25 13:36:29 ram Exp $ +?RCS: $Id$ ?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. +?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: Csym.U,v $ ?RCS: Revision 3.0.1.4 1995/07/25 13:36:29 ram @@ -47,7 +47,7 @@ csym='tlook=$1; case "$3" in -v) tf=libc.tmp; tc=""; tdc="";; -a) tf=libc.tmp; tc="[0]"; tdc="[]";; -*) tlook="^$1\$"; tf=libc.list; tc="()"; tdc="()";; +*) tlook="^$1\$"; tf=libc.list; tc=""; tdc="()";; esac; tx=yes; case "$reuseval-$4" in @@ -64,22 +64,23 @@ yes) fi;; *) ?X: -?X: Put symbol inside a printf to fool optimizing compilers... -?X: -?X: We use 'short' instead of 'int' to try to circumvent overzealous +?X: We use 'char' instead of 'int' to try to circumvent overzealous ?X: optimizing compilers using built-in prototypes for commonly used ?X: routines to complain when seeing a different external declaration. For ?X: instance, gcc 2.6.3 fails if we use 'int' and we attempt a test against ?X: memcpy() on machines where sizeof(int) == sizeof(char *) (the usual return ?X: type), the compiler assuming it's a built-in declaration given that the -?X: returned size matches. At least with 'short' we are safe! -- RAM, for ADO +?X: returned size matches. At least with 'char' we are safe! -- RAM, for ADO ?X: ?X: Let's thank GNU cc for making our lifes so easy! :-) ?X: (An alternative for the future would be to use our knowledge about gcc -?X: to force a -fno-builtin option in the compile test, in case the 'short' +?X: to force a -fno-builtin option in the compile test, in case the 'char' ?X: trick is obsoleted by future gcc releases). -- RAM ?X: - echo "main() { extern short $1$tdc; printf(\"%hd\", $1$tc); }" > t.c; +?X: Lastly, gcc 3.4 otimizes &missing == 0 away, so we use + 2 instead now. +?X: The GNU folks like to do weird things, don't they? -- RAM, 2004-06-05 +?X: + echo "extern char $1$tdc; int main() { return &$1$tc + 2; }" > t.c; if $cc $ccflags $ldflags -o t t.c $libs >/dev/null 2>&1; then tval=true; else tval=false; |