Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] struct sizes hardcoded?

The cross platform issue is of more immediate concern anyway since GTK
shoudln't break bin-compat for a while. For example, since Sun is moving
to GNOME (and hence GTK) as their primary desktop environment it seems
like the Solaris version of Eclipse should be released with a GTK
version sooner or later (same with HP/UX, actually....Motif/CDE is
dying). Also, I assume that in both the SWT run-everywhere spirit and
the general open source port-to-every-unix-platform-possible spirit its
desirable that SWT/GTK should run on every platform GTK has been ported
to (many/most). 

Without this hard-coding of sizes, compiling SWT/GTK on these platforms
should usually be as simple as, well, compiling. Can the SWT team manage
these porting issues, have special versions of the code or special
compilation tweaks/modes for each platform? Yes. I believe it will be
unnecessary work/maintenance, but its certainely far from impossible.
The problem is that much of the open source collaboration open source
projects see (in my experience) is from people on other platforms. SWT
is already hard enough to compile, and at this point could not be
compiled on another platform without major assistance.

-Seth

Quoting snickell@xxxxxxxxxxxx:

> Not so. Every C app in the world will need a version released
> recompiled
> against the new GTK. SWT will need to have source code rewritten.
> Hardcoding sizes is just bad news, it makes even binary
> compatibility
> breaks source compatibility breaks.
> 
> -Seth
> 
> Quoting Steve Northover <Steve_Northover@xxxxxxx>:
> 
> > 
> > When GTK breaks binary compatibility, then every C app in the
> world
> > is
> > screwed
> > along with SWT.  These numbers are generated by a small C program.
> > 
> > 
> > 
> >                                                                    
>  
> >                                                                    
> 
> > 
> >                       snickell@xxxxxxxxxxxx                        
>  
> >                                                                    
> 
> > 
> >                       Sent by:                        To:     
> > platform-swt-dev@xxxxxxxxxxx                                       
>  
> >       
> >                       platform-swt-dev-admin@         cc:          
>  
> >                                                                    
> 
> > 
> >                       eclipse.org                     Subject:
> > [platform-swt-dev] struct sizes hardcoded?                         
>  
> >       
> >                                                                    
>  
> >                                                                    
> 
> > 
> >                                                                    
>  
> >                                                                    
> 
> > 
> >                       09/18/02 07:33 PM                            
>  
> >                                                                    
> 
> > 
> >                       Please respond to                            
>  
> >                                                                    
> 
> > 
> >                       platform-swt-dev                             
>  
> >                                                                    
> 
> > 
> >                                                                    
>  
> >                                                                    
> 
> > 
> >                                                                    
>  
> >                                                                    
> 
> > 
> > 
> > 
> > 
> > Hi,
> > 
> > I was switching to not allocating GtkIters using a "custom" native
> > function. However.... I don't see a way you can pass custom types
> > into
> > "sizeof" from Java. I noticed that many of the struct types have
> > hardcoded sizes in their "java equivalents" (not wrappers really,
> I
> > guess, but the classes like GdkEvent, etc).
> > 
> > This seems like not only a maintenance nightmare in the long run
> (I
> > assume GTK will eventually break GTK compat, and the errors
> generated
> > by
> > hardcoding the sizes could be very difficult to find), but worse,
> > doesn't seem portable in the least. Many of these structures
> contain
> > types which will be different sizes on, for example, 64-bit
> integer
> > platforms. Am I totally missing something or is this as broken as
> it
> > seems?
> > 
> > Unless somebody can figure out a way to express sizeof in Java
> code,
> > it
> > seems like the only way to really deal with this is to have custom
> > native functions for the sizeof each struct of interest, e.g.
> > sizeofGdkEvent, sizeofGtkIter, that sort of thing (but of course,
> > that's
> > unquestionably evil, better to sacrifice maintenance and
> > correctness).
> > 
> > -Seth
> > _______________________________________________
> > platform-swt-dev mailing list
> > platform-swt-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> > 
> > 
> > 
> > 
> > _______________________________________________
> > platform-swt-dev mailing list
> > platform-swt-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> > 
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-swt-dev
> 


Back to the top