=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/Attic/sock.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/cvs/Attic/sock.c 2004/07/25 03:31:24 1.2 --- src/usr.bin/cvs/Attic/sock.c 2004/08/02 17:30:10 1.3 *************** *** 1,4 **** ! /* $OpenBSD: sock.c,v 1.2 2004/07/25 03:31:24 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: sock.c,v 1.3 2004/08/02 17:30:10 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 57,62 **** --- 57,63 ---- static struct sockaddr_un cvs_sun; + #ifdef CVSD /* * cvsd_sock_open() * *************** *** 149,156 **** return (0); } ! /* * cvs_sock_connect() * --- 150,158 ---- return (0); } + #endif ! #ifdef CVS /* * cvs_sock_connect() * *************** *** 158,168 **** */ int ! cvs_sock_connect(const char *cvsroot) { cvs_sun.sun_family = AF_LOCAL; ! snprintf(cvs_sun.sun_path, sizeof(cvs_sun.sun_path), "%s/%s", ! cvsroot, CVSD_SOCK_PATH); cvs_log(LP_INFO, "connecting to CVS server socket `%s'", cvs_sun.sun_path); --- 160,169 ---- */ int ! cvs_sock_connect(const char *path) { cvs_sun.sun_family = AF_LOCAL; ! strlcpy(cvs_sun.sun_path, path, sizeof(cvs_sun.sun_path)); cvs_log(LP_INFO, "connecting to CVS server socket `%s'", cvs_sun.sun_path); *************** *** 197,199 **** --- 198,201 ---- if (close(cvs_sock) == -1) cvs_log(LP_ERRNO, "failed to close local socket"); } + #endif