This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SableVM & Cygwin (was: Re: sablevm + windows)


Hi Gerrit, Hi Peter,

I looked at the patches to screen what's really needed.

* SableVM

IIUC the "foreign" was used only because of libffi being 'included' into
sources which, as discussed earlier, we can't accept.  BTW.  Some claim
(I have not verified it) that you need to set this flag in the toplevel
dir only.

The only diff not related to inclusion of libffi was this:
--- sablevm-1.1.6-orig/src/sablevm/sablevm.c
+++ sablevm-1.1.6/src/sablevm/sablevm.c
@@ -972,7 +972,11 @@
 #define ARG_COPYRIGHT 11
 #define ARG_NO_COPYRIGHT 12
 
+#ifndef __CYGWIN__
   static const struct poptOption options[] =   /* description of
command line options */
+#else /* __CYGWIN__ */
+  static struct poptOption options[] = /* description of command line
options */
+#endif /* __CYGWIN__ */
   {
     {"classpath", 'c', POPT_ARG_STRING, &argument, ARG_CLASS_PATH, "set
class path", "\"PATH\""},
     {"property", 'p', POPT_ARG_STRING, &argument, ARG_PROPERTY, "set
system property", "\"NAME=VALUE\""},

Why can't this struct be const?  We don't write to it.  Is this because
of how .data is handled in DLLs?  This would need some comment in the
patch so that next person that looks at this knew why it's there,
because it looks strange at the first sight.


* SableVM Classpath

Could you please handle the -no-undefined in similar way as it's done in
SableVM?  When cygwin is detected we set @NO_UNDEFINED@ to -no-undefined
We don't want to hardcode it.

+# override FLAGS for Cygwin
+AM_CFLAGS=-pedantic -Wmissing-declarations -Wmissing-prototypes
-Wstrict-prototypes -Wall -Wno-long-long -D_BSD_SOURCE

If you need to change flags, then I think it should be done again in
configure when Cygwin is detected.  Don't override, just add
conditionally what is needed or disallowed for Cygwin.
What actually are the flags that you need to add/remove? (-ansi ?)

You asked:
> Is tzname and timezone not ANSI?  Why is it used in sablevm then?  Or
> is the Cygwin time.h wrong about this?

If it's any indication of anything - we haven't hit this problem on any
other platform (i.e. *BSD), so maybe there's some common sense that
these things should be made available even when -ansi is required?

But I am fine with removing -ansi for Cygwin.

You also said:
> And one more, I needed to cast timezone to an int to get it compiled
> on Cygwin, here is defined timezone as time_t.

I looked into /usr/include/time.h and I see:

extern __IMPORT time_t _timezone;
#define timezone ((long int) _timezone)

So isn't timezone already casted to a long int?  It should not be a
problem then, no?  What kind of error do you get while compiling?


Hope this helps,

				Grzegorz B. Prokopski

-- 
Grzegorz B. Prokopski           <gadek@sablevm.org>
SableVM - Free, LGPL'ed Java VM  http://sablevm.org
Why SableVM ?!?                  http://sablevm.org/wiki/Features
Debian GNU/Linux - the Free OS   http://www.debian.org



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]