This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
/\=/ does not require \ even in older awk
[metaconfig.git] / U / modified / d_strerror.U
1 ?RCS: $Id: d_strerror.U,v 3.0.1.3 1994/05/13 15:20:27 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4 ?RCS:
5 ?RCS: You may redistribute only under the terms of the Artistic License,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic License; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
10 ?RCS:
11 ?RCS: $Log: d_strerror.U,v $
12 ?RCS: Revision 3.0.1.3  1994/05/13  15:20:27  ram
13 ?RCS: patch27: now uses new macro support for cleaner Strerror def
14 ?RCS:
15 ?RCS: Revision 3.0.1.2  1994/05/06  14:58:26  ram
16 ?RCS: patch23: renamed strerror into Strerror to protect name space (ADO)
17 ?RCS:
18 ?RCS: Revision 3.0.1.1  1994/01/24  14:08:56  ram
19 ?RCS: patch16: protected code looking for sys_errnolist[] with @if
20 ?RCS: patch16: added default value for d_sysernlst
21 ?RCS:
22 ?RCS: Revision 3.0  1993/08/18  12:07:35  ram
23 ?RCS: Baseline for dist 3.0 netwide release.
24 ?RCS:
25 ?MAKE:d_syserrlst d_sysernlst: Csym Findhdr
26 ?MAKE:  -pick add $@ %<
27 ?S:d_syserrlst:
28 ?S:     This variable conditionally defines HAS_SYS_ERRLIST if sys_errlist[] is
29 ?S:     available to translate error numbers to strings.
30 ?S:.
31 ?S:d_sysernlst:
32 ?S:     This variable conditionally defines HAS_SYS_ERRNOLIST if sys_errnolist[]
33 ?S:     is available to translate error numbers to the symbolic name.
34 ?S:.
35 ?C:HAS_SYS_ERRLIST (SYSERRLIST):
36 ?C:     This symbol, if defined, indicates that the sys_errlist array is
37 ?C:     available to translate error numbers to strings. The extern int
38 ?C:     sys_nerr gives the size of that table.
39 ?C:.
40 ?C:HAS_SYS_ERRNOLIST (SYSERRNOLIST):
41 ?C:     This symbol, if defined, indicates that the sys_errnolist array is
42 ?C:     available to translate an errno code into its symbolic name (e.g.
43 ?C:     ENOENT). The extern int sys_nerrno gives the size of that table.
44 ?C:.
45 ?H:#$d_syserrlst HAS_SYS_ERRLIST        /**/
46 ?H:#$d_sysernlst HAS_SYS_ERRNOLIST      /**/
47 ?H:.
48 ?D:d_sysernlst=''
49 ?T:val
50 : see if sys_errlist[] exists
51 echo " "
52 if test "X$d_syserrlst" = X; then
53         if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
54                 echo "You have sys_errlist[], so we could roll our own strerror."
55                 d_syserrlst="$define"
56         else
57                 echo "You don't have sys_errlist[], so strerror() is welcome."
58                 d_syserrlst="$undef"
59         fi
60 fi
61 @if d_sysernlst || HAS_SYS_ERRNOLIST
62 if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
63         echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
64         d_sysernlst="$define"
65 else
66         echo "(However, I can't extract the symbolic error code out of errno.)"
67         d_sysernlst="$undef"
68 fi
69 @end
70