use AF_UNIX for the family

2001-05-22  JP Rosevear  <jpr@ximian.com>

	* 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-22  JP Rosevear  <jpr@ximian>

	* e-search-bar/Makefile.am: include gal cflags
This commit is contained in:
JP Rosevear 2001-05-22 22:07:34 +00:00 committed by JP Rosevear
parent 8a956cde95
commit f98e622027
3 changed files with 22 additions and 5 deletions

View file

@ -1,3 +1,15 @@
2001-05-22 JP Rosevear <jpr@ximian.com>
* 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 <chema@celorio.com>
* location.c (location_store_xml): add a carriage return after the

View file

@ -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));
}

View file

@ -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);
}