Hi Andreas,
We'd definitely like to support Solaris. I'm surprised that it
doesn't support strdup() - it's pretty widely-supported (it comes from
4.4BSD, and I thought Solaris got all of that stuff via SunOS).
You can add an implementation like this:
char *strdup(const char *in)
{
size_t len = strlen(in);
char *out = malloc(len+1);
strcpy(out, in);
return out;
}
If you declare that as static and pop it in runtime.c with #ifdef
__solaris__ around it, then it should work fine. Let me know about
any GNUisms in the makefiles. We test regularly on GNU/Linux and
FreeBSD, which use different /bin/sh (bash and pdksh, I believe) so we
catch most of them, but there may be some missing.
David
On 21 Aug 2009, at 15:03, Andreas Höschler wrote:
> Hi all
>
>> On Fri, Aug 21, 2009 at 12:11:55PM +0200, Andreas Höschler wrote:
>>> making all for framework ObjectiveC2...
>>> Compiling file runtime.c ...
>>> runtime.c: In function `class_addIvar':
>>> runtime.c:149: warning: implicit declaration of function `strdup'
>>> runtime.c:149: warning: assignment makes pointer from integer
>>> without
>>> a cast
>>> runtime.c:150: warning: assignment makes pointer from integer
>>> without
>>> a cast
>>> runtime.c: In function `class_addMethod':
>>> runtime.c:180: warning: assignment makes pointer from integer
>>> without
>>> a cast
>>> runtime.c: In function `objc_allocateClassPair':
>>> runtime.c:743: warning: assignment makes pointer from integer
>>> without
>>> a cast
>>
>> If I recall correctly strdup() is not mandatory according to POSIX.
>> So
>> with some C libraries you have to explicitly turn it on (glibc
>> behaves
>> that way, for example). Maybe you could check your system's strings.h
>> whether strdup() is wrapped in some #ifdef that needs be set.
>
> Thanks for the hint. I found
>
> /usr/include/strings.h
> /usr/share/src/gcc-4.2.3/fixincludes/tests/base/strings.h
> /usr/share/src/gcc-3.4.4/gcc/fixinc/tests/base/strings.h
>
> on the Solaris box but none of these files contains any occurance of
> strdup! :-(
>
> Is Etoile really so system (very special linux) specific in the
> meanwhile? I got Etoile 0.2 built on Solaris with great efforts. Now
> with 0.4.x this seems to be even more difficult. :-( Any more ideas?
>
> Am I (still) the only one that is using GNUstep/Etoile on Solaris? In
> conjunction with Sun Ray Server and Secure Global Desktop, Solaris is
> by far the most interesting target platform for Etoile IMHO. So it's
> definitely worth supporting this platform. All these software products
> (including the OS) can be downloaded for free from www.sun.com and run
> on a wide variety of x86 hardware. I really recommend anyone
> interested
> to give it a try. I can also provide a VBox image of the latest
> Solaris
> 10 x86 (with GNUstep already preinstalled) if anyone in interested.
>
> Thanks,
>
> Andreas
>
>
> _______________________________________________
> Etoile-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/etoile-discuss
_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss