jwh@wgate.UUCP (Joe Hughes) (09/11/90)
I am trying to compile tinymud2 on an HP 9000/360 running HP-UX ver. 7.0. I run into a problem with what I think are BSD'isms. When linking I wind up with 3 undefined symbols: _getdtablesize _bcopy _index I can't find anything that explains what they do, so I can't try writing my own versions for our OS, since our OS is SYSV. Any help would be appreciated. Please e-mail me at the address in the signature. Thanks in advance. Joe Hughes -- Joe Hughes Wandel & Goltermann Technologies, Inc. Home (919) 469-3851 1030 Swabia Court Work (919) 941-5730 Research Triangle Park uunet.uu.net!wgate.com!jwh North Carolina 27709-3585
brnstnd@kramden.acf.nyu.edu (Dan Bernstein) (09/12/90)
In article <138@wgate.UUCP> jwh@wgate.UUCP (Joe Hughes) writes: [ undefined symbols in linking on an HP 9000/360 under HP-UX 7.0 ] > _getdtablesize > _bcopy > _index getdtablesize returns the maximum number of file descriptors; try replacing any use of it by NOFILE. (Obligatory swipe at C: You can't do this with a macro.) bcopy(src,dst,len) is (basically) the same as memcpy(dst,src,len). Finally, index is strchr. ---Dan
gwyn@smoke.BRL.MIL (Doug Gwyn) (09/13/90)
In article <22531:Sep1119:36:4090@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >getdtablesize returns the maximum number of file descriptors; try >replacing any use of it by NOFILE. (Obligatory swipe at C: You can't do >this with a macro.) Sure you can, assuming that the application does not contain an explicit declaration like extern int getdtablesize(); which would be a pretty safe assumption for many BSD-based applications. #define getdtablesize() NOFILE /* assuming <stdio.h> is being #included */ >bcopy(src,dst,len) is (basically) the same as memcpy(dst,src,len). Except for the types of the function return and also the "len" argument. Also, a few uses of bcopy() assume memmove()-like behavior for overlapping source and destination, in which case memcpy() may not be suitable.