summaryrefslogtreecommitdiff
path: root/mcon/U/errnolist.U
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2003-12-01 17:11:15 +0000
committerManoj Srivastava <srivasta@debian.org>2003-12-01 17:11:15 +0000
commit371472d9fb6a936149b105a6563a0550d35bdf1a (patch)
tree6d23751e44a7dddf4e29918551f1ea0513352622 /mcon/U/errnolist.U
Initial import of upstream branch
Initial import of upstream branch git-archimport-id: srivasta@debian.org--2003-primary/dist--upstream--3.70--base-0
Diffstat (limited to 'mcon/U/errnolist.U')
-rw-r--r--mcon/U/errnolist.U106
1 files changed, 106 insertions, 0 deletions
diff --git a/mcon/U/errnolist.U b/mcon/U/errnolist.U
new file mode 100644
index 0000000..9e4f438
--- /dev/null
+++ b/mcon/U/errnolist.U
@@ -0,0 +1,106 @@
+?RCS: $Id: errnolist.U,v 3.0.1.2 1997/02/28 15:48:01 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, 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:
+?RCS: $Log: errnolist.U,v $
+?RCS: Revision 3.0.1.2 1997/02/28 15:48:01 ram
+?RCS: patch61: replaced .a with $_a all over the place
+?RCS: patch61: likewise for .o replaced by $_o
+?RCS:
+?RCS: Revision 3.0.1.1 1994/01/24 14:10:54 ram
+?RCS: patch16: created
+?RCS:
+?MAKE:errnolist errnolist_SH errnolist_a errnolist_c errnolist_o: cat +cc \
+ +ccflags +libs +d_sysernlst _a _o
+?MAKE: -pick add $@ %<
+?S:errnolist:
+?S: This variable holds the base name of a file containing the
+?S: definition of the sys_errnolist array, if the C library
+?S: doesn't provide it already. Otherwise, its value is empty.
+?S: The following lines should be included in your Makefile.SH:
+?S:
+?S: case "$errnolist" in
+?S: '') ;;
+?S: *)
+?S: $spitshell >>Makefile <<!GROK!THIS!
+?S: $errnolist_c: $errnolist_SH $errnolist_a
+?S: sh ./$errnolist_SH
+?S:
+?S: !GROK!THIS!
+?S: ;;
+?S: esac
+?S:
+?S: You may define the 'errnolist' variable in your Myinit.U if you
+?S: wish to override its default value "errnolist".
+?S:.
+?S:errnolist_SH:
+?S: This is the name of a file which will generate errnolistc.
+?S:.
+?S:errnolist_a:
+?S: This is the name of the awk script called by errnolist_SH.
+?S:.
+?S:errnolist_c:
+?S: This is the name of a generated C file which provides the
+?S: definition of the sys_errnolist array.
+?S:.
+?S:errnolist_o:
+?S: This is the name of the object file which provides the
+?S: definition of the sys_errnolist array, if the C library
+?S: doesn't provide it already. Otherwise, its value is empty.
+?S:.
+?INIT:errnolist=errnolist
+: check for sys_errnolist
+@if d_sysernlst || HAS_SYS_ERRNOLIST
+case "$d_sysernlst" in
+"$define")
+ errnolist=''
+ errnolist_SH=''
+ errnolist_a=''
+ errnolist_c=''
+ errnolist_o=''
+ ;;
+*)
+ echo " "
+ echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
+ errnolist_SH=$errnolist.SH
+ errnolist_a=$errnolist$_a
+ errnolist_c=$errnolist.c
+ errnolist_o=$errnolist$_o
+ ;;
+esac
+@else
+echo " "
+$cat <<EOM
+Checking to see if your C library provides us with sys_errnolist[]...
+EOM
+$cat >errnolist.c <<'EOCP'
+extern char *sys_errnolist[];
+main() {
+ char *p0 = sys_errnolist[0];
+ char *p1 = sys_errnolist[1];
+
+ return (p0 == p1); /* Make sure they're not optimized away */
+}
+EOCP
+if $cc $ccflags -o errnolist errnolist.c $libs >/dev/null 2>&1 ; then
+ echo "It does."
+ errnolist=''
+ errnolist_SH=''
+ errnolist_a=''
+ errnolist_c=''
+ errnolist_o=''
+else
+ echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
+ errnolist_SH=$errnolist.SH
+ errnolist_a=$errnolist$_a
+ errnolist_c=$errnolist.c
+ errnolist_o=$errnolist$_o
+fi
+@end
+