Compiling tinymud2 under HP-UX
Doug Gwyn
gwyn at smoke.BRL.MIL
Thu Sep 13 06:16:20 AEST 1990
In article <22531:Sep1119:36:4090 at kramden.acf.nyu.edu> brnstnd at 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.
More information about the Comp.unix.questions
mailing list