diff --git a/archiver/ChangeLog b/archiver/ChangeLog index e24f380cf..bbe3ff59a 100644 --- a/archiver/ChangeLog +++ b/archiver/ChangeLog @@ -1,3 +1,15 @@ +2001-05-22 JP Rosevear + + * config-log.c (bind_socket): use AF_UNIX for the family + + * location.c (run_backend_proc): use putenv() rather than setenv() + for solaris + + * config-log.c: define the SUN_LEN macro for those systems not + having it + (connect_socket): use the more portable domain type, PF_LOCAL + seems to map to PF_UNIX on linux anyhow + 2001-05-12 Chema Celorio * location.c (location_store_xml): add a carriage return after the diff --git a/archiver/config-log.c b/archiver/config-log.c index bd6219787..da87b12ad 100644 --- a/archiver/config-log.c +++ b/archiver/config-log.c @@ -41,6 +41,11 @@ #define READ_BUF_LEN 4096 +#ifndef SUN_LEN +#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ + + strlen ((ptr)->sun_path)) +#endif + static GtkObjectClass *parent_class; enum { @@ -1073,7 +1078,7 @@ connect_socket (ConfigLog *config_log) config_log->p->socket_buffer = NULL; config_log->p->socket_owner = check_socket_filename (config_log); - fd = socket (PF_LOCAL, SOCK_STREAM, 0); + fd = socket (PF_UNIX, SOCK_STREAM, 0); if (fd < 0) { g_warning ("Could not create socket: %s", g_strerror (errno)); @@ -1166,7 +1171,7 @@ bind_socket (ConfigLog *config_log, int fd, gboolean do_connect) /* FIXME: What if the socket filename is too long here? */ if (config_log->p->socket_owner || do_connect) { - name.sun_family = AF_LOCAL; + name.sun_family = AF_UNIX; strncpy (name.sun_path, config_log->p->socket_filename, sizeof (name.sun_path)); } diff --git a/archiver/location.c b/archiver/location.c index 42821da7b..d6b88e17b 100644 --- a/archiver/location.c +++ b/archiver/location.c @@ -1479,9 +1479,9 @@ run_backend_proc (gchar *backend_id, gboolean do_get) path = g_getenv ("PATH"); if (!strstr (path, XST_BACKEND_LOCATION)) { - path1 = g_strconcat (XST_BACKEND_LOCATION, ":", path, - NULL); - setenv ("PATH", path1, TRUE); + path1 = g_strconcat ("PATH=", XST_BACKEND_LOCATION, + ":", path, NULL); + putenv (path1); g_free (path1); }