Re: ffi library port to Windows

Enrico Migliore <[email protected]> Tue, 23 May 2006 11:15:55 +0200
Newsgroups gmane.comp.java.vm.sablevm.general
Organization -
Message-ID <[email protected]>
Hi Etienne,

>>1. directory tree
>>----------------
>>
>>The ctypes guys, instead of adding #ifdef's to the original source files
>>of ffi, decided to make a copy of the following files:
>>...
>>That means that GCC and MSVC work on different source files. A while
>>ago, we agreed on adding #ifdef wherever possible, in order to have just
>>one source tree. What are we supposed to do?
>>    
>>
>
>I would say:  we should do as is done elsewhere in libffi.  I think that
>for assembly language files, libffi puts the code in separate files, but
>for most other things uses the same source files.  Yet, maybe this is
>not practical.  I would leave it to your good judgment to make the call...
>
>  
>
>>2. license issue
>>---------------
>>Am I supposed to ask for permission to the Ctpye guys, before re-working
>>and submitting the source files to the SableVM project?
>>    
>>
>
>Are you dropping all the work you had already done?  I was pointing this
>work as I discovered it by accident, more or less, to help you if
>validate your work, not necessarily to use it.
>
>Yet, CType's license seems OK.  But, It would be unclean for you to mix
>and merge sablevm's libffi and CType's libffi in your working copy; we
>would lose clear copyright trail. :-(
>
>So, could you tell me more about the status of your previous work,
>first, before we decide to merge CType's code?
>  
>
Before discovering the Ctype project, I had:

 1. Downloaded the SableVM source tree
 2. Written by hand the fficonfig.h file, based on my knoledge of MSVC 
and Windows 2000 (*)
 3. Inspected the ffi source files
 4. Added some "#ifdef  WIN32" to the source files of ffi
 5. Made a new project in MSVC, and built the whole thing

(*) The Ctypes guys did the very same thing

I was about to translate the Win32.s (assembly file for GCC) into a 
version suitable for MSVC, when you addressed me to the Ctypes project.
The Ctypes' guys started out by the exisisting ffi code, and made the 
code buildable forMSVC and mingw32, by adding some directives like:

      "#ifdef _MSC_VER"

and by translating the Win32.s for MSVC. So, if we switch to the Ctypes' 
ffi source files, I don't throw away much....
After all, the work I did allowed me to study the ffi library in details.

I would say: let me build and run all tests, and afterwards we will 
decide how to merge the ffi source files into the SableVM tree.

Enrico

P.S.
We, of course, have to merge just the ffi part, of the Ctype project.