Re: [AD] [PATCH] Solaris Fixes and dev notes

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday 05 June 2005 19:13, Shawn Walker wrote:
> > Rather than checking for any of the sun preprocessor directives
> > (which are unreliable, as I recall) we should have the configure script
> > check if the function exists - afterall, we don't want to know if we're 
on
> > Solaris, but if getexecname() works!
> 
> 
> That's sounds better certainly, but I don't know how to do that :) I 
don't 
> use configure or the like in any of my personal projects.

That's ok, I usually look at the existing configure.in and aclocal.m4 to 
get an idea on how to do things myself and then read the manual if I can't 
figure it out.

> It also seems to me that the BSD's might use this same code section (the 
> System V way)?

Yes, but without the argv parameter.

> Well, I had already covered the concern of the function not suceeding. 
But, 
> it looks like the only additional possibility is that sometimes it might 
> return a relative path to the executable instead of an absolute path. It 
> suggests pre-pending the output of getcwd in such a case. Otherwise, I 
think 
> it's definitely the preferred way to go about this. I can make the 
necessary 
> change to have it account for the relative path case, as I'm not 
concerned 
> about the warning regarding getcwd not working: "unless the process or 
one 
> of its ancestors has changed its root directory or current working 
directory 
> since the last successful call to one of the exec family of functions". 
> Since this happens at the beginning of the allegro init cycle. Once 
someone 
> changes the current working directory all bets are off anyway.

The problem is, someone might actually do just that. It just occured to me 
that the return value of get_executable_name() would not change during the 
execution of the programme, so redoing all the work all the time seems a 
bit silly. I'll see if I can address both issues.

> However you folks want to work it out, I just can't use it right now 
unless 
> I make those changes.

Right, I'm not saying it shouldn't be fixed, just fixed in a different way.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/