mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 14:50:19 +02:00
* Makefile.am (EXTRA_DIST): add errnos_cnvt.awk, errnos.default,
errnos_get.c. Add a rule to generate errnos.c from errnos. * error.c (scm_init_error): include errnos.c. * errnos_cnvt.awk: new file, converts the list of errno codes to C expressions. * errnos_get.c: new file. * errnos.default: new file, contains errnos to try if they can't be extracted from errno.h. * configure.in: if using GCC, try and extract errno codes from errno.h. Added AC_PROG_AWK.
This commit is contained in:
parent
b9e19a2773
commit
ee78fbb067
6 changed files with 95 additions and 3 deletions
|
@ -1,3 +1,18 @@
|
||||||
|
Mon Jan 13 03:47:04 1997 Gary Houston <ghouston@actrix.gen.nz>
|
||||||
|
|
||||||
|
* Makefile.am (EXTRA_DIST): add errnos_cnvt.awk, errnos.default,
|
||||||
|
errnos_get.c.
|
||||||
|
Add a rule to generate errnos.c from errnos.
|
||||||
|
* error.c (scm_init_error): include errnos.c.
|
||||||
|
* errnos_cnvt.awk: new file, converts the list of errno codes to
|
||||||
|
C expressions.
|
||||||
|
* errnos_get.c: new file.
|
||||||
|
* errnos.default: new file, contains errnos to try if they can't
|
||||||
|
be extracted from errno.h.
|
||||||
|
* configure.in: if using GCC, try and extract errno codes from
|
||||||
|
errno.h.
|
||||||
|
Added AC_PROG_AWK.
|
||||||
|
|
||||||
Sat Jan 11 14:47:00 1997 Marius Vollmer <mvo@zagadka.ping.de>
|
Sat Jan 11 14:47:00 1997 Marius Vollmer <mvo@zagadka.ping.de>
|
||||||
|
|
||||||
* configure.in: Replaced AC_PROG_RANLIB with AM_PROG_LIBTOOL.
|
* configure.in: Replaced AC_PROG_RANLIB with AM_PROG_LIBTOOL.
|
||||||
|
@ -58,7 +73,7 @@ Tue Jan 7 15:04:06 1997 Mikael Djurfeldt <mdj@kenneth>
|
||||||
Mon Jan 6 20:39:08 1997 Gary Houston <ghouston@actrix.gen.nz>
|
Mon Jan 6 20:39:08 1997 Gary Houston <ghouston@actrix.gen.nz>
|
||||||
|
|
||||||
* socket.c (scm_recvfrom): allow buff_or_size to be a list containing
|
* socket.c (scm_recvfrom): allow buff_or_size to be a list containing
|
||||||
the buffer and start and end positions for SCSH networking
|
the buffer and start and end positions for scsh networking
|
||||||
implementation.
|
implementation.
|
||||||
|
|
||||||
Sun Jan 5 13:53:53 1997 Jim Blandy <jimb@floss.cyclic.com>
|
Sun Jan 5 13:53:53 1997 Jim Blandy <jimb@floss.cyclic.com>
|
||||||
|
|
|
@ -44,7 +44,8 @@ modinclude_DATA = scmconfig.h
|
||||||
bin_SCRIPTS = guile-snarf
|
bin_SCRIPTS = guile-snarf
|
||||||
|
|
||||||
EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
|
EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
|
||||||
dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config PLUGIN/guile.libs.in
|
dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \
|
||||||
|
PLUGIN/guile.libs.in errnos_cnvt.awk errnos.default errnos_get.c
|
||||||
|
|
||||||
## FIXME: shouldn't directly generate file; instead generate temp file
|
## FIXME: shouldn't directly generate file; instead generate temp file
|
||||||
## and "mv". Consider using timestamp file as well, to avoid
|
## and "mv". Consider using timestamp file as well, to avoid
|
||||||
|
@ -66,3 +67,9 @@ dynl.o dynl.lo: dynl.x
|
||||||
|
|
||||||
## Add -MG to make the .x magic work with auto-dep code.
|
## Add -MG to make the .x magic work with auto-dep code.
|
||||||
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
|
errnos.c: errnos.list
|
||||||
|
$(AWK) -f $(srcdir)/errnos_cnvt.awk < errnos.list > errnos.c
|
||||||
|
|
||||||
|
CLEANFILES=errnos.c
|
||||||
|
DISTCLEANFILES=errnos.list
|
||||||
|
|
|
@ -88,11 +88,15 @@ modinclude_DATA = scmconfig.h
|
||||||
bin_SCRIPTS = guile-snarf
|
bin_SCRIPTS = guile-snarf
|
||||||
|
|
||||||
EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
|
EXTRA_DIST = gscm.c gscm.h ChangeLog-scm dynl-dl.c dynl-dld.c dynl-shl.c \
|
||||||
dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config PLUGIN/guile.libs.in
|
dynl-vms.c DYNAMIC-LINKING PLUGIN/REQ PLUGIN/guile.config \
|
||||||
|
PLUGIN/guile.libs.in errnos_cnvt.awk errnos.default errnos_get.c
|
||||||
|
|
||||||
SUFFIXES = .x
|
SUFFIXES = .x
|
||||||
|
|
||||||
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
|
CLEANFILES=errnos.c
|
||||||
|
DISTCLEANFILES=errnos.list
|
||||||
ACLOCAL = $(top_srcdir)/aclocal.m4
|
ACLOCAL = $(top_srcdir)/aclocal.m4
|
||||||
CONFIG_HEADER_IN = scmconfig.h.in
|
CONFIG_HEADER_IN = scmconfig.h.in
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||||
|
@ -489,6 +493,9 @@ libpath.h: Makefile
|
||||||
|
|
||||||
dynl.o dynl.lo: dynl.x
|
dynl.o dynl.lo: dynl.x
|
||||||
|
|
||||||
|
errnos.c: errnos.list
|
||||||
|
$(AWK) -f $(srcdir)/errnos_cnvt.awk < errnos.list > errnos.c
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
48
libguile/configure
vendored
48
libguile/configure
vendored
|
@ -2748,6 +2748,53 @@ case "$GCC" in
|
||||||
yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
|
yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
for ac_prog in mawk gawk nawk awk
|
||||||
|
do
|
||||||
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
|
set dummy $ac_prog; ac_word=$2
|
||||||
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
|
echo "configure:2757: checking for $ac_word" >&5
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
if test -n "$AWK"; then
|
||||||
|
ac_cv_prog_AWK="$AWK" # Let the user override the test.
|
||||||
|
else
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||||
|
for ac_dir in $PATH; do
|
||||||
|
test -z "$ac_dir" && ac_dir=.
|
||||||
|
if test -f $ac_dir/$ac_word; then
|
||||||
|
ac_cv_prog_AWK="$ac_prog"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AWK="$ac_cv_prog_AWK"
|
||||||
|
if test -n "$AWK"; then
|
||||||
|
echo "$ac_t""$AWK" 1>&6
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -n "$AWK" && break
|
||||||
|
done
|
||||||
|
|
||||||
|
echo $ac_n "checking whether errno codes can be extracted from errno.h""... $ac_c" 1>&6
|
||||||
|
echo "configure:2786: checking whether errno codes can be extracted from errno.h" >&5
|
||||||
|
goterrnos=0
|
||||||
|
if test "$GCC" = yes ; then
|
||||||
|
${CC-cc} -undef -dM -E $srcdir/errnos_get.c | egrep ' E.+' | cut -f2 -d' ' > errnos.list
|
||||||
|
egrep '^E.+' errnos.list > /dev/null 2>&1 && goterrnos=1
|
||||||
|
fi
|
||||||
|
if test $goterrnos = 1 ; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
else
|
||||||
|
cp $srcdir/errnos.default errnos.list
|
||||||
|
echo "$ac_t""no, using default" 1>&6
|
||||||
|
fi
|
||||||
|
|
||||||
cat >> confdefs.h <<EOF
|
cat >> confdefs.h <<EOF
|
||||||
#define GUILE_MAJOR_VERSION "$GUILE_MAJOR_VERSION"
|
#define GUILE_MAJOR_VERSION "$GUILE_MAJOR_VERSION"
|
||||||
EOF
|
EOF
|
||||||
|
@ -2911,6 +2958,7 @@ s%@RANLIB@%$RANLIB%g
|
||||||
s%@LIBTOOL@%$LIBTOOL%g
|
s%@LIBTOOL@%$LIBTOOL%g
|
||||||
s%@LIBOBJS@%$LIBOBJS%g
|
s%@LIBOBJS@%$LIBOBJS%g
|
||||||
s%@xtra_PLUGIN_guile_libs@%$xtra_PLUGIN_guile_libs%g
|
s%@xtra_PLUGIN_guile_libs@%$xtra_PLUGIN_guile_libs%g
|
||||||
|
s%@AWK@%$AWK%g
|
||||||
s%@FD_SETTER@%$FD_SETTER%g
|
s%@FD_SETTER@%$FD_SETTER%g
|
||||||
|
|
||||||
CEOF
|
CEOF
|
||||||
|
|
|
@ -221,6 +221,20 @@ case "$GCC" in
|
||||||
yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
|
yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
AC_PROG_AWK
|
||||||
|
AC_MSG_CHECKING(whether errno codes can be extracted from errno.h)
|
||||||
|
goterrnos=0
|
||||||
|
if test "$GCC" = yes ; then
|
||||||
|
${CC-cc} -undef -dM -E $srcdir/errnos_get.c | egrep ' E.+' | cut -f2 -d' ' > errnos.list
|
||||||
|
egrep '^E.+' errnos.list > /dev/null 2>&1 && goterrnos=1
|
||||||
|
fi
|
||||||
|
if test $goterrnos = 1 ; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
else
|
||||||
|
cp $srcdir/errnos.default errnos.list
|
||||||
|
AC_MSG_RESULT([no, using default])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, "$GUILE_MAJOR_VERSION")
|
AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, "$GUILE_MAJOR_VERSION")
|
||||||
AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, "$GUILE_MINOR_VERSION")
|
AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, "$GUILE_MINOR_VERSION")
|
||||||
AC_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION")
|
AC_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION")
|
||||||
|
|
|
@ -323,6 +323,7 @@ scm_wta (arg, pos, s_subr)
|
||||||
void
|
void
|
||||||
scm_init_error ()
|
scm_init_error ()
|
||||||
{
|
{
|
||||||
|
#include "errnos.c"
|
||||||
#include "error.x"
|
#include "error.x"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue