head	1.1;
access;
symbols;
locks; strict;
comment	@# @;


1.1
date	2003.07.31.17.36.55;	author shige;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Add elisp/emacsen ports in the ports tree @@ 2003/07/31
@
text
@$FreeBSD$
--- lib-src/emacsclient.c.old	Tue Jul 23 23:18:33 1996
+++ lib-src/emacsclient.c	Thu Oct  8 22:34:54 1998
@@@@ -94,6 +94,8 @@@@
     struct stat statbfr;
 
     gethostname (system_name, sizeof (system_name));
+    system_name[sizeof (system_name) - 1] = '\0';
+		/* system_name must be null-terminated string */
     sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name);
 
     if (stat (server.sun_path, &statbfr) == -1)
--- lib-src/emacsserver.c.old	Wed Jul 17 07:09:29 1996
+++ lib-src/emacsserver.c	Thu Oct  8 22:35:08 1998
@@@@ -115,6 +115,8 @@@@
   server.sun_family = AF_UNIX;
 #ifndef SERVER_HOME_DIR
   gethostname (system_name, sizeof (system_name));
+  system_name[sizeof (system_name) - 1] = '\0';
+		/* system_name must be null-terminated string */
   sprintf (server.sun_path, "/tmp/esrv%d-%s", geteuid (), system_name);
 
   if (unlink (server.sun_path) == -1 && errno != ENOENT)
@
