Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!bsu-cs!neubauer From: neubauer@bsu-cs.bsu.edu (Paul Neubauer) Newsgroups: comp.sources.d Subject: vt100clock Keywords: cuserid()?, BSD, SysV Message-ID: <7150@bsu-cs.bsu.edu> Date: 9 May 89 15:35:05 GMT Distribution: na Organization: CS Dept, Ball St U, Muncie, IN, USA Lines: 36 I tried to compile Joel Spolsky's vt100clock program from Vol. 6, Issue 98, archived as clock.msk. I am running on a BSD 4.3 system, if that is any help. The command 'cc vt100clock.c' produced the output: Undefined: _cuserid Joel #includes a number of the usual sorts of .h files, but none of them contain cuserid(), in fact, a grep of /usr/include and /usr/include/sys gave me no clue about the function or what it does. I assume that it is a SysV function, but a quick look at the ATT SysV Programmers Guide (I don't have the books in front of me so that may not be a completely accurate title) (Vols. I and II) also did not find cuserid() in the index. It shows up in two places in Joel's program: /* remember where mail is kept */ sprintf(path, MAILFILE, cuserid(NULL)); and /* check mail */ old_size = new_size; if (!stat(sprintf(path, MAILFILE, cuserid(NULL)), &st)) new_size = st.st_size; else new_size = 0; Can anybody tell me (1) what it does, (2) if there is a BSD equivalent or near-equivalent, and/or (3) what to do about it? Thanks much. -- Paul Neubauer neubauer@bsu-cs.bsu.edu neubauer@bsu-cs.UUCP !{iuvax,pur-ee}!bsu-cs!neubauer