Your test program works (I assume you meant "word" in the printf instead of
"foo"), but then it is simpler example. randtest.c and rand_lib.c are
different files, so the binder has to resolve the static references across file
scopes. I can't say if we are seeing a bug in OS/390 or a more rigourous
treatment compared to other platforms. I am not familar with the C standards
in this area.
I made the same change on AIX, and it operates the same whether the "static" is
in rand_lib or not.
--Evan
> Uhmm, so you're telling us that variables that are defined static
> (which in this case means they are in file scope, non-extern) can't be
> initialized like that? I would say that's a big fluke in the C
> compiler, unless it's said in the C standard that this kind of
> initialization may not work.
>
> Have you tested a program like this?
>
> ----- 8< -----
> #include <stdio.h>
> #include <stdlib.h>
>
> static char word[] = "foo";
> main()
> {
> printf("The world is %s today\n", foo);
> }
> ----- 8< -----
>
> If that program prints "The world is foo today", then the static
> rand_meth in rand_lib.c should work, and it could be a good thing to
> investigate why the C compiler behaves differently when compiling
> OpenSSL. If the above little program doesn't print said phrase, you
> have a buggy C compiler.
---------------------------------------------
This message was sent via the Ulsternet webmail system.
http://www.ulster.net
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]