Subject: [netatalk-admins] getwd, getdtablesize, wait3, Oh My!

From: Kareem Kazkaz <[email-masked]>
Date: Tue, 14 Oct 1997 13:43:26 -0500 (CDT)

Hello there.

I am compiling netatalk-1.4b2 on my Solaris 2.5.1 system using gcc-2.7.2.2
and am running into problems with unknown function calls.  I have created
a kludge.h file that I use to replace calls to functions index, rindex, bzero,
bcopy, and bcmp, but I am now running into problems with the functions
getdtablesize, getwd, and wait3.  I was wondering if these functions have
replacements similar to how the other functions I have mentioned have
replacements.  If anybody knows, could you drop me a hint?  Also, if anybody
knows of other functions I may run into that might not exist on my system,
please clue me in to those as well.

For the curious, here is the kludge.h file I use to make the replacements
mentioned above:

/*
	kludge.h

	This file is used to replace calls to the functions listed below.
	Caveat programmer.
*/

#define index strchr
#define rindex strrchr
#define bcopy(a, b, c) memcpy(b, a, c)
#define bzero(d, e) memset(d, 0, e)
#define bcmp(f, g, h) ( strncmp(f, g, h) == 0 ? 0 : 1 )

---------------------------------------------------------------------------
Kareem Kazkaz                                                System Manager
Health Computer Sciences                        [email-masked]
PHONE: (612) 625-3694                                   FAX: (612) 625-7166
Mail Address:   Box 511 Mayo, 420 Delaware Street SE, Minneapolis, MN 55455
Office Address:  V366A VFWCRC, 406 Harvard Street SE, Minneapolis, MN 55455

---

From: Edan Idzerda <[email-masked]>
Date: Tue, 14 Oct 1997 17:29:13 -0400 (EDT)

> getdtablesize, getwd, and wait3.  I was wondering if these functions have

I think your problem is somewhere else.  The following output is from 
a local system here, editing to show only the good parts.

critter:src/rumba.0.4.s% uname -a                                                       
SunOS critter 5.5.1 Generic_103640-08 sun4u sparc SUNW,Ultra-1
critter:~% nm /usr/lib/libc.a | egrep 'bzero|bcmp|bcopy|getdtable|getwd|wait3' 
[6]     |         0|      44|FUNC |GLOB |0    |2      |bcmp
[7]     |         0|      40|FUNC |GLOB |0    |2      |bcopy
[6]     |         0|      40|FUNC |GLOB |0    |2      |bzero
[6]     |         0|      28|FUNC |GLOB |0    |2      |getdtablesize
[10]    |         0|     132|FUNC |GLOB |0    |2      |getwd
[6]     |         0|      40|FUNC |GLOB |0    |2      |wait3

I can't say that I know off the top of my head what your
problem is, but I can say that you have a fairly major 
problem with your gcc installation.  Could it be that
gcc was not compiled to look in your standard library
directories, like /usr/lib?  All of your 'missing'
functions are available in libc.

- edan

--
Edan Idzerda	<[email-masked]>
System Administrator --  Michigan Technological University, Houghton MI USA

---

From: Kareem Kazkaz <[email-masked]>
Date: Tue, 14 Oct 1997 16:40:53 -0500 (CDT)

>a local system here, editing to show only the good parts.

[snip]

>functions are available in libc.

Blimey.  gcc looks first in /usr/local/lib for libraries, and if it finds them
looks no further.  The libc.a in /usr/lib does indeed have everything I'm 
looking for, though.

Thank you very much.  This was getting to be frustrating.

						Kareem