C++ allows empty struct or class (gcc 4.0 supports empty struct even in
C). Empty struct/class can be used as a placeholder for future
development.


-----Original Message-----
From: Sebastian Hartte [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 04, 2005 1:23 AM
To: harmony-dev@incubator.apache.org
Subject: Re: compiling bootJVM with MSVC

Hi you two,

I tried a similar thing (using Visual Studio 2005 Professional). The
empty structs are still an error in that compiler version (What do you
need empyt structs for anyway? Allocation a zero byte memory region
doesn't make much sense to me).
But i also run into problems with pthread.h since that doesn't exist on
Windows. Either i screwed up and included the wrong header files
(but i think jvm.h belongs to the project) or the threading is entirely
based on pthreads.
Isn't there some form of platform independent threading in the apache
httpd
project that could be used over here? After all refactoring is cool ;-)

bye,
Sebastian

Enrico Migliore wrote:

>
>> Enrico,
>>
>> Did Tim's comment help?  Did this resolve it?
>> Have you had any other porting issues in either
>> compilation or configuration?  I would like for us to
>> keep up with these sorts of issues because it would
>> be great if we could support MSVC as one of the
>> development _and_ target type environments
>> for bootJVM.
>>
>> Are you by chance familiar with doing InstallShield
>> scripts?  This would give us an alternative for Windows
>> platforms for doing configuration and installation.
>> Please let everyone know what all you find as you
>> work with the MSVC environment so that that source
>> can be adjusted for portability when all the issues
>> are resolved.  Just by the way, I'm still working on
>> the final bit of basic functionality of the JVM runtime
>> engine and should have something available soon.
>> Thanks for your help and interest.
>>
>> Dan Lydick
>>
>>
>>  
>>
> Hi Dan,
>
> I'm trying to compille bootJVM with MSVC 6.0.
>
> Tim's. suggestion (long long = __int64) works fine.
>
> I didn't translate the configuration and build scripts into .bat files
> for Windows, I just
> ran the scripts in Cygwin, in order to have the source tree available
> and made a
> "console application" in MSVC.
> I'm not much familiar with InstallShield scripts and honestly I'd
> prefer to dedicate
> my spare time to work on the source code side (C is my "daily bread").
>
> Right now I got some problems which I'm planning to solve during the
> weekend,
> here are two examples:
>
>
------------------------------------------------------------------------
--------------
>
> rvoid argv_init(int argc, char **argv, char **envp)
> {
>    rchar *chkjh;
>    chkjh =  (rchar *) rnull;
>    rchar *chkcp;     <--- MSVC flags this as a compilation error
>
> ..\jvm\src\argv.c(127) : error C2275: 'rchar' : illegal use of this
> type as an expression
>
------------------------------------------------------------------------
--------------
>
>
>
------------------------------------------------------------------------
--------------
>
> typedef struct
> {
>    u1 tag;
>    u2 string_index;
>
>    struct LOCAL_String_binding
>    {
>                                                   <-- MSVC doesn't
> like an empty struct
>    } LOCAL_String_binding;
>                                            } CONSTANT_String_info;
>
> ..\jvm\src\classfile.h(1031) : error C2059: syntax error : '}'
>
> I have to add "int foo;" in order to proceed
>
------------------------------------------------------------------------
--------------
>
>
>
> Certainly, the code will have to be slightly adjusted for portability.
>
> Let me proceed and after the weekend I'll write a report.
>
>
> ciao,
> Enrico
>
>
>

Reply via email to