1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

portability fixes for header inclusion etc.

This commit is contained in:
Gary Houston 1996-08-07 09:46:41 +00:00
parent 458d621d1f
commit 95b8881908
27 changed files with 144 additions and 52 deletions

View file

@ -1,3 +1,53 @@
Wed Aug 7 06:28:42 1996 Gary Houston <ghouston@actrix.gen.nz>
* Fixes motivated by Petr Adamek <adamek@mit.edu>:
* unif.c: include ramap.h.
* read.c (endif): case_insensative_p renamed case_insensitive_p.
* ramap.h: rename scm_array_copy prototypes to scm_array_copy_x.
* ports.c: include sys/ioctl.h.
* scmconfig.h.in: add HAVE_SYS_IOCTL_H.
* configure.in: check for sys/ioctl.h.
* ports.c: include <malloc.h> not "malloc.h".
* mallocs.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
* fports.c: remove ttyname and tmpnam declarations.
* posix.c: fewer ttyname declarations.
* fports.c: include <string.h> not "string.h".
* init.c, ioext.c: include string.h and unistd.h.
* gc.c: include <malloc.h> not "malloc.h", likewise for unistd.h.
* async.c, strings.h, strports.c, struct.c, symbols.c, feature.c, genio.c, simpos.c, vports.c:
include string.h.
* socket.c, fdsocket.c: include string.h only if HAVE_STRING_H.
* fdsocket.c (getsockopt, setsockopt): change type of optlen from
scm_sizet to int.
(scm_addr_buffer_size): change type from scm_sizet to int.
(accept, getsockname, getpeername, recvfrom): change type of tmp_size
from scm_sizet to int.
* error.c: include unistd.h.
* __scm.h: (SCM_SYSMISSING): another version in case ENOSYS isn't
defined.
* Makefile.in: remove references to .hd, .cd suffix and __scm.hd.
* __scm.hd, def.sed: deleted.
Tue Aug 6 14:49:08 1996 Jim Blandy <jimb@totoro.cyclic.com>
Changes for NeXT, suggested by Robert Brown.

View file

@ -144,7 +144,7 @@ libobjs= alist.o \
$(extras)
uninstalled_h_files= _scm.h __scm.hd
uninstalled_h_files= _scm.h
installed_h_files= __scm.h \
alist.h \
@ -365,21 +365,7 @@ manifest = $(ancillary) $(c_sources)
.SUFFIXES:
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo .scm .cd .x .hd
.cd.c:
( echo "/* DO NOT EDIT --- AUTO-GENERATED --- DO NOT EDIT */" > $@ \
&& echo -n "#line 1" \" \
&& echo $<\" | sed -e "s,^.*/,," >> $@ \
&& sed -f $(srcdir)/def.sed $< >> $@) \
|| rm -f $@
.hd.h:
( echo "/* DO NOT EDIT --- AUTO-GENERATED --- DO NOT EDIT */" > $@ \
&& echo -n "#line 1" \" >> $@ \
&& echo $<\" | sed -e "s,^.*/,," >> $@ \
&& sed -f $(srcdir)/def.sed $< >> $@) \
|| rm -f $@
.SUFFIXES: .o .c .h .ps .dvi .info .texinfo .scm .x
.c.x:
if test ! -escmconfig.h ; then \
@ -477,8 +463,6 @@ depends:
rm $(gen_c_files)
rm scmconfig.h
$(srcdir)/__scm.h: __scm.hd
###
alist.o : alist.c _scm.h libguile.h __scm.h tags.h smob.h params.h alist.h append.h \
arbiters.h async.h boolean.h chars.h continuations.h dynwind.h eq.h error.h \

View file

@ -1,5 +1,3 @@
/* DO NOT EDIT --- AUTO-GENERATED --- DO NOT EDIT */
#line 1 "__scm.hd"
/* classes: h_files */
#ifndef __SCMH
@ -180,7 +178,6 @@ typedef unsigned long ulong_long;
# endif /* ndef _CRAY1 */
#endif /* ndef vms */
/* James Clark came up with this neat one instruction fix for
* continuations on the SPARC. It flushes the register windows so
* that all the state of the process is contained in the stack.
@ -285,6 +282,7 @@ extern unsigned int scm_async_clock;
if (!(_cond)) \
goto _label
#endif
#define SCM_SYSERROR(_subr) \
scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
strerror (errno), _subr)
@ -295,10 +293,15 @@ extern unsigned int scm_async_clock;
scm_makfrom0str (_subr), \
SCM_UNDEFINED));
*/
#define SCM_SYSMISSING(_subr) \
scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
strerror (ENOSYS), _subr)
#ifdef ENOSYS
# define SCM_SYSMISSING(_subr) \
scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
strerror (ENOSYS), _subr)
#else
# define SCM_SYSMISSING(_subr) \
scm_everr (SCM_UNDEFINED, SCM_EOL, SCM_UNDEFINED, \
"missing function, even ENOSYS is missing", _subr)
#endif
#define SCM_ARGn 0
#define SCM_ARG1 1
#define SCM_ARG2 2

View file

@ -44,6 +44,9 @@
#include <signal.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

2
libguile/configure vendored
View file

@ -1210,7 +1210,7 @@ EOF
fi
for ac_hdr in libc.h limits.h malloc.h memory.h string.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h time.h unistd.h
for ac_hdr in libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6

View file

@ -20,7 +20,7 @@ AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h time.h unistd.h)
AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h time.h unistd.h)
AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL

View file

@ -43,6 +43,9 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

View file

@ -43,6 +43,9 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
SCM *scm_loc_features;

View file

@ -42,22 +42,20 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#else
char *ttyname ();
char *tmpnam ();
scm_sizet fwrite ();
#endif
#ifdef HAVE_STRING_H
#include "string.h"
#endif
#ifdef __IBMC__
#include <io.h>
#include <direct.h>
#define ttyname(x) "CON:"
#else
#ifndef MSDOS
#ifndef ultrix

View file

@ -43,11 +43,11 @@
#include "_scm.h"
#ifdef HAVE_MALLOC_H
#include "malloc.h"
#include <malloc.h>
#endif
#ifdef HAVE_UNISTD_H
#include "unistd.h"
#include <unistd.h>
#endif

View file

@ -43,6 +43,9 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif

View file

@ -43,6 +43,12 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef __STDC__

View file

@ -42,10 +42,15 @@
#include <stdio.h>
#include <unistd.h>
#include "fd.h"
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
SCM_PROC (s_sys_ftell, "ftell", 1, 0, 0, scm_sys_ftell);

View file

@ -23,10 +23,10 @@
#include "_scm.h"
#include "mallocs.h"
#ifdef HAVE_MALLOC_H
#include "malloc.h"
#include <malloc.h>
#endif
#ifdef HAVE_UNISTD_H
#include "unistd.h"
#include <unistd.h>
#endif

View file

@ -44,13 +44,16 @@
#ifdef HAVE_MALLOC_H
#include "malloc.h"
#include <malloc.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif

View file

@ -61,6 +61,10 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#else
#ifndef ttyname
extern char *ttyname();
#endif
#endif
#ifdef HAVE_SYS_SELECT_H
@ -102,7 +106,6 @@
#endif /* no FD_SET */
extern char *ttyname ();
extern FILE *popen ();
extern char ** environ;
@ -602,10 +605,6 @@ scm_setsid ()
return SCM_UNSPECIFIED;
}
#ifndef ttyname
extern char * ttyname();
#endif
SCM_PROC (s_ttyname, "ttyname", 1, 0, 0, scm_ttyname);
#ifdef __STDC__
SCM

View file

@ -52,7 +52,7 @@ extern int scm_ra_matchp (SCM ra0, SCM ras);
extern int scm_ramapc (int (*cproc) (), SCM data, SCM ra0, SCM lra, char *what);
extern int scm_array_fill_int (SCM ra, SCM fill, SCM ignore);
extern SCM scm_array_fill_x (SCM ra, SCM fill);
extern SCM scm_array_copy (SCM src, SCM dst);
extern SCM scm_array_copy_x (SCM src, SCM dst);
extern int scm_ra_eqp (SCM ra0, SCM ras);
extern int scm_ra_lessp (SCM ra0, SCM ras);
extern int scm_ra_leqp (SCM ra0, SCM ras);
@ -75,7 +75,7 @@ extern int scm_ra_matchp ();
extern int scm_ramapc ();
extern int scm_array_fill_int ();
extern SCM scm_array_fill_x ();
extern SCM scm_array_copy ();
extern SCM scm_array_copy_x ();
extern int scm_ra_eqp ();
extern int scm_ra_lessp ();
extern int scm_ra_leqp ();

View file

@ -54,12 +54,12 @@
SCM_PROC (s_read, "read", 0, 3, 0, scm_read);
#ifdef __STDC__
SCM
scm_read (SCM port, SCM case_insensative_p, SCM sharp)
scm_read (SCM port, SCM case_insensitive_p, SCM sharp)
#else
SCM
scm_read (port, case_insensative_p, sharp)
scm_read (port, case_insensitive_p, sharp)
SCM port;
SCM case_insensative_p;
SCM case_insensitive_p;
SCM sharp;
#endif
{
@ -72,9 +72,9 @@ scm_read (port, case_insensative_p, sharp)
else
SCM_ASSERT (SCM_NIMP (port) && SCM_OPINPORTP (port), port, SCM_ARG1, s_read);
case_i = (SCM_UNBNDP (case_insensative_p)
case_i = (SCM_UNBNDP (case_insensitive_p)
? default_case_i
: (case_insensative_p == SCM_BOOL_F));
: (case_insensitive_p == SCM_BOOL_F));
if (SCM_UNBNDP (sharp))
sharp = SCM_BOOL_F;

View file

@ -176,6 +176,9 @@
/* Define if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define if you have the <time.h> header file. */
#undef HAVE_TIME_H

View file

@ -42,6 +42,10 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

View file

@ -8,8 +8,12 @@
#include <stdio.h>
#include <string.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>

View file

@ -46,6 +46,10 @@
#include "__scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#define SCM_STRINGP(x) (SCM_TYP7S(x)==scm_tc7_string)

View file

@ -43,6 +43,10 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
/* {Ports - string ports}

View file

@ -43,6 +43,10 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
static SCM required_vtable_fields = SCM_BOOL_F;

View file

@ -43,6 +43,10 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif

View file

@ -42,6 +42,7 @@
#include <stdio.h>
#include "_scm.h"
#include "ramap.h"
/* The set of uniform scm_vector types is:

View file

@ -43,6 +43,10 @@
#include <stdio.h>
#include "_scm.h"
#ifdef HAVE_STRING_H
#include <string.h>
#endif
/* {Ports - soft ports}