Re: getutxent() not returning values when using 10.4u SDK
Re: getutxent() not returning values when using 10.4u SDK
- Subject: Re: getutxent() not returning values when using 10.4u SDK
- From: Terry Lambert <email@hidden>
- Date: Thu, 24 Jul 2008 16:22:13 -0700
On Jul 24, 2008, at 1:51 PM, Rosyna wrote:
If I call setutxent()/getutxent()/endutxent() when using the 10.5
SDK while on 10.5, I correctly get the various fields filled out. If
I use the 10.4u SDK only the username is filled out. The ut_type and
ut_pid and ut_tv fields are all empty.
Why would they be empty when the only change is the SDK?
You are also changing the libraries you link against when you change
your SDK. Prior to 10.5, the utmpx implementation was not fully UNIX
conformant, so you get different answers with 10.5 than you did with
10.4; specifically, if you installed in the normal place, you are
linking against /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/
libSystem.B.dylib instead of /usr/lib/libSystem.B.dylib.
The specific code that implements the UNIX conformat utmpx in 10.5 is
in Libc project in gen/utmpx-darwin.[ch] (10.4 does not have these
files).
You are unlikely to be able to back-port this code to 10.4; for the
components that were touched for UNIX conformance, there were as many
lines of code that changed as were changed in all of the other changes
between Tiger and Leopard combined, and there are dependencies on
subsequent changes to the structure of libinfo (among others).
If you want the same information back for both SDKs, then you need to
limit yourself to utmp instead, since that was fully supported in
10.4, and is a common API (it's considered legacy on 10.5 and later,
but it should give the same answers for both SDKs).
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden