? autom4te.cache ? debian.sh ? redhat.sh ? doc/guile-api.sed ? doc/guile-api.texi ? doc/manual ? doc/serveez-api.info ? doc/serveez-api.sed ? doc/serveez-api.texi ? doc/serveez-procedures.txt ? doc/serveez.info ? src/mkpassword ? src/serveez ? src/serveez-config ? src/serveez.cfg ? src/svzconfig.h ? src/libserveez/svzpath.h ? test/array-test ? test/codec-test ? test/hash-test ? test/prog-test ? test/spvec-test ? test/vector-test Index: src/ChangeLog =================================================================== RCS file: /cvsroot/serveez/serveez/src/ChangeLog,v retrieving revision 1.233 diff -u -p -r1.233 ChangeLog --- src/ChangeLog 5 Jan 2003 15:28:08 -0000 1.233 +++ src/ChangeLog 2 Feb 2003 16:10:29 -0000 @@ -1,3 +1,9 @@ +2003-01-05 Andreas Rottmann + + * guile.c, guile-api.h, guile-api.c, guile-server.c: Modified to + work with Guile 1.7, too. + * guile-server.c: Fixed invalid SCM_CONCAT2 invokation. + 2002-11-28 Andreas Rottmann * fakeident-server/ident-proto.c (fakeident_server_definition): Index: src/guile-api.c =================================================================== RCS file: /cvsroot/serveez/serveez/src/guile-api.c,v retrieving revision 1.28 diff -u -p -r1.28 guile-api.c --- src/guile-api.c 17 Jul 2002 18:34:18 -0000 1.28 +++ src/guile-api.c 2 Feb 2003 16:10:32 -0000 @@ -698,13 +698,13 @@ static SCM scm_return_rpcentry (struct rpcent *entry) { SCM ans; - SCM *ve; - + SCM ve[3]; + ans = scm_c_make_vector (3, SCM_UNSPECIFIED); - ve = SCM_VELTS (ans); ve[0] = scm_makfrom0str (entry->r_name); ve[1] = scm_makfromstrs (-1, entry->r_aliases); ve[2] = scm_ulong2num ((unsigned long) entry->r_number); + SCM_SETVELTS(ans, ve); return ans; } @@ -745,7 +745,7 @@ scm_getrpc (SCM arg) if (!entry) scm_syserror_msg (FUNC_NAME, "no such rpc service ~A", - scm_listify (arg, SCM_UNDEFINED), errno); + scm_list_n (arg, SCM_UNDEFINED), errno); return scm_return_rpcentry (entry); } #undef FUNC_NAME @@ -792,8 +792,9 @@ scm_portmap_list (SCM address) struct sockaddr_in addr, raddr; struct pmaplist *map; char *str; - SCM list = SCM_EOL, mapping, *ve; - + SCM list = SCM_EOL, mapping; + SCM ve[4]; + memset (&addr, 0, sizeof (struct sockaddr_in)); #if HAVE_GET_MYADDRESS get_myaddress (&addr); @@ -822,11 +823,13 @@ scm_portmap_list (SCM address) do { mapping = scm_c_make_vector (4, SCM_UNSPECIFIED); - ve = SCM_VELTS (mapping); + ve[0] = scm_ulong2num ((unsigned long) map->pml_map.pm_prog); ve[1] = scm_ulong2num ((unsigned long) map->pml_map.pm_vers); ve[2] = scm_ulong2num ((unsigned long) map->pml_map.pm_prot); ve[3] = scm_ulong2num ((unsigned long) map->pml_map.pm_port); + SCM_SETVELTS(mapping, ve); + list = scm_cons (mapping ,list); } while ((map = map->pml_next) != NULL); @@ -856,8 +859,8 @@ scm_portmap (SCM prognum, SCM versnum, S { if (!pmap_unset (SCM_INUM (prognum), SCM_INUM (versnum))) scm_syserror_msg (FUNC_NAME, "~A: pmap_unset ~A ~A", - scm_listify (scm_makfrom0str (strerror (errno)), - prognum, versnum, SCM_UNDEFINED), + scm_list_n (scm_makfrom0str (strerror (errno)), + prognum, versnum, SCM_UNDEFINED), errno); } else @@ -870,9 +873,10 @@ scm_portmap (SCM prognum, SCM versnum, S if (!pmap_set (SCM_INUM (prognum), SCM_INUM (versnum), SCM_INUM (protocol), (unsigned short) SCM_INUM (port))) scm_syserror_msg (FUNC_NAME, "~A: pmap_set ~A ~A ~A ~A", - scm_listify (scm_makfrom0str (strerror (errno)), - prognum, versnum, protocol, port, - SCM_UNDEFINED), errno); + scm_list_n (scm_makfrom0str (strerror (errno)), + prognum, versnum, protocol, port, + SCM_UNDEFINED), + errno); } return SCM_UNSPECIFIED; } @@ -1073,9 +1077,9 @@ guile_read_file (SCM port, SCM size) { scm_must_free (data); scm_syserror_msg (FUNC_NAME, "~A: read ~A ~A", - scm_listify (scm_makfrom0str (strerror (errno)), - scm_int2num (fdes), size, SCM_UNDEFINED), - errno); + scm_list_n (scm_makfrom0str (strerror (errno)), + scm_int2num (fdes), size, SCM_UNDEFINED), + errno); } else if (ret == 0) { Index: src/guile-api.h =================================================================== RCS file: /cvsroot/serveez/serveez/src/guile-api.h,v retrieving revision 1.11 diff -u -p -r1.11 guile-api.h --- src/guile-api.h 15 Jul 2002 07:45:04 -0000 1.11 +++ src/guile-api.h 2 Feb 2003 16:10:33 -0000 @@ -33,6 +33,7 @@ #ifndef SCM_VERSION_15X #define scm_t_bits long +#define scm_list_n scm_listify #endif /* Some definitions for backward compatibility with Guile 1.3.4 */ Index: src/guile-bin.c =================================================================== RCS file: /cvsroot/serveez/serveez/src/guile-bin.c,v retrieving revision 1.27 diff -u -p -r1.27 guile-bin.c --- src/guile-bin.c 27 Jul 2002 13:32:14 -0000 1.27 +++ src/guile-bin.c 2 Feb 2003 16:10:34 -0000 @@ -96,11 +96,11 @@ guile_bin_print (SCM binary, SCM port, s /* Smob free function: Releases any allocated resources used the given cell @var{binary}. No need to mark any referring scheme cell. Returns the number of bytes actually free()'d. */ -static scm_sizet +static size_t guile_bin_free (SCM binary) { guile_bin_t *bin = GET_BIN_SMOB (binary); - scm_sizet size = sizeof (guile_bin_t); + size_t size = sizeof (guile_bin_t); /* Free the data pointer if it has been allocated by ourselves and is not just a reference. */ Index: src/guile-server.c =================================================================== RCS file: /cvsroot/serveez/serveez/src/guile-server.c,v retrieving revision 1.52 diff -u -p -r1.52 guile-server.c --- src/guile-server.c 5 Dec 2002 16:57:55 -0000 1.52 +++ src/guile-server.c 2 Feb 2003 16:10:39 -0000 @@ -114,7 +114,7 @@ static int GUILE_CONCAT3 (guile_,ctype,_ scm_puts (txt, port); \ return 1; \ } \ -static scm_sizet GUILE_CONCAT3 (guile_,ctype,_free) (SCM smob) { \ +static size_t GUILE_CONCAT3 (guile_,ctype,_free) (SCM smob) { \ return 0; \ } \ static void GUILE_CONCAT3 (guile_,ctype,_init) (void) { \ @@ -157,7 +157,7 @@ static SCM GUILE_CONCAT2 (guile_sock_,fu if (!SCM_UNBNDP (proc)) { \ SCM_ASSERT_TYPE (SCM_PROCEDUREP (proc), proc, SCM_ARG2, FUNC_NAME, \ "procedure"); \ - GUILE_CONCAT2 (xsock->,func) = GUILE_CONCAT2 (guile_func_,func); \ + xsock->func = GUILE_CONCAT2 (guile_func_,func); \ return guile_sock_setfunction (xsock, assoc, proc); } \ return guile_sock_getfunction (xsock, assoc); \ } @@ -166,6 +166,13 @@ static SCM GUILE_CONCAT2 (guile_sock_,fu #define DEFINE_SOCK_CALLBACK(assoc, func) \ scm_c_define_gsubr (assoc, 1, 1, 0, GUILE_CONCAT2 (guile_sock_,func)) + +/* Compatibility with Guile 1.6 and below */ +#if !defined(SCM_MAJOR_VERSION) || ((SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6)) +typedef scm_catch_body_t scm_t_catch_body; +typedef scm_catch_handler_t scm_t_catch_handler; +#endif + /* * Extract a guile procedure from an option hash. Return zero on success. */ @@ -446,9 +453,9 @@ guile_call (SCM code, int args, ...) if (guile_use_exceptions) { ret = scm_internal_catch (SCM_BOOL_T, - (scm_catch_body_t) guile_call_body, + (scm_t_catch_body) guile_call_body, (void *) body_data, - (scm_catch_handler_t) guile_call_handler, + (scm_t_catch_handler) guile_call_handler, (void *) handler_data); } else Index: src/guile.c =================================================================== RCS file: /cvsroot/serveez/serveez/src/guile.c,v retrieving revision 1.69 diff -u -p -r1.69 guile.c --- src/guile.c 5 Dec 2002 16:57:56 -0000 1.69 +++ src/guile.c 2 Feb 2003 16:10:41 -0000 @@ -1786,10 +1786,8 @@ guile_serveez_load (SCM file) /* Evaluate (load) file and catch exception. */ ret = scm_internal_catch (SCM_BOOL_T, - (scm_catch_body_t) guile_serveez_load_file, - (void *) f, - (scm_catch_handler_t) guile_exception, - (void *) f); + guile_serveez_load_file, f, + guile_exception, f); svz_free (f); return ret; } @@ -1856,7 +1854,7 @@ guile_eval_file (void *data) !S_ISCHR (buf.st_mode) && !S_ISBLK (buf.st_mode))) { SCM ret = SCM_BOOL_F, line; - while (!SCM_EOF_OBJECT_P (line = scm_read (scm_def_inp))) + while (!SCM_EOF_OBJECT_P (line = scm_read (scm_cur_inp))) ret = scm_primitive_eval_x (line); return SCM_BOOL_T; } @@ -1877,10 +1875,8 @@ guile_load_config (char *cfgfile) guile_init (); ret = scm_internal_catch (SCM_BOOL_T, - (scm_catch_body_t) guile_eval_file, - (void *) cfgfile, - (scm_catch_handler_t) guile_exception, - (void *) cfgfile); + guile_eval_file, cfgfile, + guile_exception, cfgfile); if (SCM_FALSEP (ret)) guile_global_error = -1;