cygwin1 dll and JAVA-JNI dll loading is buggy

2004-11-17 Thread Gilles Bourgeois


Hello
Next year (using the current version of cygwin which I can not remember), I 
managed to load from java (JNI) a dll (build against cygwin1.dll) compiled with 
gcc under cygwin.
Now , I have updated my cygwin (1.5.9 for me tooday), and it does not work any 
more.
I saw on the cygwin mailing list that there is problems with DLL and JAVA under 
cygwin.
is it ok know with the latest versions of cygwin1.dll ?
TIA

Gilles
--

Faites un voeu et puis Voila ! www.voila.fr 



--
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/



PUTENV works fine if debugged with insight gdb but fails if in a standalone program !

2003-03-04 Thread gilles bourgeois
hi folks,
i am using getenv/putenv from stdlib (my source comes from UNIX world).
the point is that getenv works fine, but I CANNOT modify variables with PUTENV !!
Actually, if I debug with insight gdb a little foo.c using setenv , it works fine !!!
I really do not undestand why (I suppose it is a question of shell environment) , so 
I wonder if some of you ever succeed with a simple putenv wriiten in a tiny C program ?
thanks 
gilles


--

Faites un voeu et puis Voila ! www.voila.fr 



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



how to run a process from DOS within a cygwin .bat file

2003-02-28 Thread gilles bourgeois
hello again
does someone knows how to launch a cygwin shell and further commands from
DOS, e.g with a help of a .bat file.
I had a look of cygwin.bat file but I do not know the right syntax to give
the command to the bash shell
thanks
gilles





--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



correction, I got the answer, sorry for disturb

2003-02-28 Thread gilles bourgeois
sorry, it was only a question of bash : bash -c make a bash with string
args.
sorry again
gilles



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



LD_LIBRARY_PATH not accessible through java under cygwin for JNI

2003-02-27 Thread gilles bourgeois
hi folks,
I am currently using my JNI so/dll library under solaris, linux and cygwin.
with solaris and linux, no problem, I bind to it using load(..) since the
LD_LIBRARY_PATH is set.
BUT, under cygwin/windows, it does not work and I shall tell the absolute
path when I load the library.
I hav already posted in java.machine, but Randall schulz told  me to try in
this mailing list.
thanks for help
gilles



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



IPC message queue through JNI may not work because of java exec !

2003-02-27 Thread gilles bourgeois
Hi folks,
I have a java graphical debugging tool which communicates with
a  process  (written in C)

both shall communicate through IPC message queue (historic : the tools where
running under solaris)

The point is :
From java side, ipc message queue is created with the help of a native dll
beeing accessed through JNI
from c side, the running process bind to the IPC queue and read data, this
is OK if the process is ***launched from a cygwin shell***
(with or without gbd)

BUT : if the running process is launched from java (within a
System.exec(PROCESS)), the C-process CANNOT bind to the IPC queue!!
I think my process does not share the same environment or what ?

if someone got an idea about this ?, I may use another solution before going
through a socket solution...

thanks
gilles




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



PUTENV is not running

2003-02-26 Thread gilles BOURGEOIS
Hi folks,
since getenv works fine, I manage to set a var with putenv, but it does not
perfom any operation at all.
(I am working with JNI, but I also tested putenv  in a little simple foo
programm)
Does anyone know about this manipulation ?
TIA
gilles




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



FIONREAD (fillio.h)

2003-02-14 Thread gilles BOURGEOIS
I have an old source code using filio.h  and FIOREAD: since this is not in
the cygwin distribution,
I DO need FION READ  and FIONBIO definitions for my program.
Does cywgin define this constant somewhere ?
thanks
GBO



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




mainCRTStartup not found at link time (ld)

2003-02-10 Thread gilles BOURGEOIS
hi folks,
I am compiling and linking a g++ parser program , I am using ld in my
makefile:
I got a warning at link time, then at execution time , my program failed
(windows Segmentation fault, I
even can not break with gdb in main main() code.

the warning is :

cannot find entry symbol _mainCRTStartup ; defaulting to 0x00401

is it the kind of thing that could fails my executable ?
what does this message means ?

thanks

gilles






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Using cygwin and JAVA/JNI

2003-01-17 Thread gilles BOURGEOIS
hello
I wonder if it is possible to use JNI upon a DLL .i.e a shared libray like
.so file generated with gcc, without the mno-cygwin option.
(my lib uses IPC SYSTEM V, that is why I rely on the cygwin and cygipc
libraries)
I am mot a newbie with java/jni or gcc, but mixing all of them seems to
crash the JVM.
Of course, It works if the library is generated with gcc under linux
but if executing the whole program (JVM instantiate) under cygwin, it fails.
any one ever performed such a tricky architecture?
thanks
gilles



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Using cygwin and JAVA/JNI

2003-01-17 Thread gilles BOURGEOIS
thanks a lot,
actually, with -Wl,--add-stdcall-alias to the gcc line, all worked fine.



- Original Message -
From: friedman_hill ernest j [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, January 17, 2003 5:27 PM
Subject: Re: Using cygwin and JAVA/JNI



 Randall is usually 100% right about everything, but here he's actually
 not. I haven't done it in a long time, but I've certainly written JNI
 libraries with cygwin -- and in fact, used some fairly cygwin specific
 features in doing so (my JNI library explicitly used dlopen() to open
 another library, as I recall, and it all worked; and furthermore, much
 of my library was written in C++, but the JNI entry points were
 exported as 'extern C.') I was amazed and thrilled when it all
 worked.

 When I did this, Mumit Khan's web page on the topic was invaluable,
 but cygwin has changed a lot since then, so I'm sure the information
 is out of date. Anyway, you might start by looking at the JNI links
 halfway down this page:

http://www.xraylith.wisc.edu/~khan/software/gnu-win32/


 I think Randall R Schulz wrote:
  Gilles,
 
  I don't believe the ABI (application binary interface) used by the
  Microsoft compilers is compatible with that used by GCC and hence the
Sun
  JVM, being compiled by the Microsoft tools, cannot access GCC-compiled
  libraries via JNI.
 
  Randall Schulz
 
 
  At 06:41 2003-01-17, gilles BOURGEOIS wrote:
  hello
  
  I wonder if it is possible to use JNI upon a DLL .i.e a shared libray
like
  .so file generated with gcc, without the mno-cygwin option. (my lib
uses
  IPC SYSTEM V, that is why I rely on the cygwin and cygipc libraries) I
am
  not a newbie with java/jni or gcc, but mixing all of them seems to
crash
  the JVM. Of course, It works if the library is generated with gcc under
  linux but if executing the whole program (JVM instantiate) under
cygwin,
  it fails. Any one ever performed such a tricky architecture? thanks
  
  gilles
 
 
  --
  Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
  Bug reporting: http://cygwin.com/bugs.html
  Documentation: http://cygwin.com/docs.html
  FAQ:   http://cygwin.com/faq/
 



 -
 Ernest Friedman-Hill
 Distributed Systems ResearchPhone: (925) 294-2154
 Sandia National LabsFAX:   (925) 294-2234
 PO Box 969, MS 9012 [EMAIL PROTECTED]
 Livermore, CA 94550 http://herzberg.ca.sandia.gov

 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Bug reporting: http://cygwin.com/bugs.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




mkfifo implementation ?

2003-01-14 Thread gilles BOURGEOIS
hi folks,
is mkfifo still not implemented (I read mailing list archive fron end of
2003) , and I ran mkfifo which return -1 (and does not set errno) in my
code.
thanks
gilles



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: mkfifo implementation ?

2003-01-14 Thread gilles BOURGEOIS
And what about IPC message queue (msgget) ?
It does returns -1 too, but may be error handling is not implemented ?

- Original Message -
From: Pavel Tsekov [EMAIL PROTECTED]
To: gilles BOURGEOIS [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, January 14, 2003 10:05 AM
Subject: Re: mkfifo implementation ?


 On Tue, 14 Jan 2003, gilles BOURGEOIS wrote:

  hi folks,
  is mkfifo still not implemented (I read mailing list archive fron end of
  2003) , and I ran mkfifo which return -1 (and does not set errno) in my
  code.

 Yes.



 --
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
 Bug reporting: http://cygwin.com/bugs.html
 Documentation: http://cygwin.com/docs.html
 FAQ:   http://cygwin.com/faq/






--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




msgget (IPC message queue) implementation

2003-01-14 Thread gilles BOURGEOIS
hi folks,
is msgget (cygipc package) still running , and I ran msgget which return -1
(and does not set errno) in my
code.
thanks for help
gilles



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




setitimer failure

2002-12-30 Thread gilles BOURGEOIS
hello.
I really have to know if the setitimer() primitive works well using cywgin
dll
I am currently using NT5.0 (2000)
I call setitimer(ITIMER_VIRTUAL, interval, NULL) and it returns -1 with bad
argument as errno .
I do not understand why, because my arguments seemes to be ok to me !
Any help very appreciated.
gilles






setitimer/SIGVTALRM error form cygwin shell.

2002-12-30 Thread gilles BOURGEOIS
Hello
I am trying to simulate a tick timer under cygwin but it does not work :
with the following code :

 /* Initialise timer structure */
  interval.it_interval.tv_sec = 1;
  interval.it_interval.tv_usec = 0;
  interval.it_value.tv_sec = 1;
  interval.it_value.tv_usec = 0;
  
   /* Initialise virtual timer */
   if (!sigaction (SIGVTALRM, sigact, 0)) 
  { 
  if ( (err=setitimer (ITIMER_PROF, s_Rtk_interval, NULL)) 0)
 {printf (StartTimer could not setitimer %d\n,err);
 printf (errno errno = %d (%s).\n, errno, strerror(errno));

  exit (0); 
 }
  }
   else 
  { 
  fprintf( stderr, Erreur :%d\n, errno ); 
  }

I got the invalid argument (errno) error ??
did someone manage the use of virtual timer under cygwin?
thanks
gilles


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




setitimer failure

2002-12-30 Thread gilles BOURGEOIS
hello.
I really have to know if the setitimer() primitive works well using cywgin
dll
I am currently using NT5.0 (2000)
I call setitimer(ITIMER_VIRTUAL, interval, NULL) and it returns -1 with bad
argument as errno .
I do not understand why, because my arguments seemes to be ok to me !
Any help very appreciated.
gilles




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




use of DLL without Cygwin/shell environment

2002-11-05 Thread gilles BOURGEOIS



hello, from france, 
(newbie using cygwin), i am wondering about how I 
could use the DLL API directly without prompting with the 
starting x terminal (bash commands)
Thefact is I want to use this DLL in order 
to createa UNIX-C compilation process(makefile + gcc), but I do not 
want the end-user to enter the CYGWIN/Shell terminal and prompt for "make" and 
others unix command.
let say this user is a windows one, and it does 
know anything about the unix world.
so I wish I could develop a quick graphical front 
end, which offers the compilation functionnalities (configuration and launch 
tool) just with the help of mouse clicks, since this functionnality is 
running under the CYGWIN.DLL API (the user not even know he is using 
cygwin...).
Thanks for any help.
gilles