Brian Dessent | 1 Jan 2007 02:22
Favicon

Re: Windows equivalent of a specific fcntl call

Vincent Torri wrote:

> I would like to translate that call:
> 
> fcntl(fd, F_SETFD, FD_CLOEXEC);
> 
> fd being the file descriptor. I've searched with google (for example:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnucmg/html/UCMGch09.asp)
> and in the mingw ML, but I didn't find any answer to that specific call.
> 
> Can someone see what I should use ?

On unix, exec*() means to replace the current process with a new
process, but keeping the same PID, CWD, environment, uid, gid, process
group membership, handles, et cetera.  No such concept exists on
Windows, so the _exec*() family of functions that are in MSVCRT are
really just wrappers around calling CreateProcess() followed by _exit(),
i.e. create a child process and then terminate the calling process.

When a process terminates the OS forcibly reclaims all its resources,
including closing all open handles.  There is nothing you can do about
this, as its one of those operating system principles that you have no
control over, otherwise system stability would be dependant on every
process cleaning itself up, and we all saw how well that worked with
Windows 3.x.

The only thing you can control is whether the child process is given a
duplicate copy of any handles in the parent that were marked as
inheritable.  This is controlled in an all-or-nothing manner by the
boolean fifth parameter to CreateProcess() and on a per-handle basis by
(Continue reading)

Vincent Torri | 1 Jan 2007 15:58
Picon

Re: Windows equivalent of a specific fcntl call


Thank you for your answer (as well as Brian Dessent).

The code works now :)

Vincent Torri

On Sun, 31 Dec 2006, Greg Chicares wrote:

> On 2006-12-31 21:01 UTC, Vincent Torri wrote:
>>
>> I would like to translate that call:
>>
>> fcntl(fd, F_SETFD, FD_CLOEXEC);
>>
>> fd being the file descriptor. I've searched with google (for example:
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnucmg/html/UCMGch09.asp)
>> and in the mingw ML, but I didn't find any answer to that specific call.
>
> Try
>  http://www.google.com/search?q=FD_CLOEXEC+windows

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
MinGW-users mailing list
MinGW-users@...
(Continue reading)

Vincent Torri | 1 Jan 2007 16:59
Picon

warning with the linker: undefined symbols


Hey,

when linker a library with MinGW (I use autotools and libtool), I get that 
warning:

libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32 
shared libraries

What does it mean ?

thank you

Vincent Torri

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Brian Dessent | 2 Jan 2007 02:26
Favicon

Re: warning with the linker: undefined symbols

Vincent Torri wrote:

> when linker a library with MinGW (I use autotools and libtool), I get that
> warning:
> 
> libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
> shared libraries
> 
> What does it mean ?

It means you need to use the libtool option "-no-undefined" on Win32
platforms if you want libtool to create shared libraries (i.e. DLLs)
otherwise it will decide to only produce static libraries.

http://article.gmane.org/gmane.comp.gnu.mingw.user/18727

If you are only producing static libraries and don't care about shared
libraries, or if you're already specifying -no-undefined and shared
libraries are produced successfully, then it is simply a warning and you
can ignore it.  (Unless you have designed the library to require
undefined references at link time, in which case you will run into
problems getting it to work on Win32.)

Brian

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
(Continue reading)

Keith MARSHALL | 2 Jan 2007 11:57
Favicon

Re: g++ hello world is not console app

Hugh McMaster wrote:
> It is probably habit, but the path for Windows uses backslashes,
> not forward slashes.  Well, you can use both, but it is easier in
> Windows to use the backslash. :)

IMO, this advice is both misleading, and unhelpful.

The use of backslash in path names is an artifact of Bill's original
rip-off of CP/M, in MS-DOS v1.x, and his attempt to fold compatibility
for that into his subsequent rip-off of UNIX concepts, in MS-DOS v2.x
and later.

In fact, the BDOS kernel code for all versions of MS-DOS, from 2.x
onwards, and inherited by all versions of MS-Windows, has *always*
treated slashes and backslashes interchangeably, as separators for
the components of path names; it is only a few brain-dead programs,
mostly from M$ themselves, but also a few from other developers who
have slavishly followed the M$ paradigm, that enforce the use of
backslashes.  (Among these of course, are the M$ shells, cmd.exe
in Woe32, and command.com in MS-DOS).

However, to say that it is easier to just use backslash is true
*only* *if* you persist in using a brain-dead shell like cmd.exe; if
you use a more capable shell, such as the sh.exe we offer with MSYS,
then you really will find it *much* easier to use a regular slash
as the path component separator, since the backslash is properly
used here, as an *escape* character.  (Ok, if you *must*, you *can*
use backslashes as path component separators, even in sh.exe, but
the extra quoting required to override the escape mechanism makes
it generally more convenient to just use regular slashes).
(Continue reading)

Vincent Torri | 2 Jan 2007 13:05
Picon

ICE when trying to compile evas library


Hey, I'm trying to port evas to Windows. I get an ICE. Here are some 
informations about the problem:

OS: windows XP
gcc: version 3.4.5 (mingw special)
ld: version 2.17.50 20060824
MinGW: 5.1.2
MSYS: 1.0.11
MSYS version: MINGW32_NT-5.1 SALON 1.0.11(0.46/3/2) 2004-04-30 18:55 i686 
unknown
mingw runtime: 3.11
w32 api: 3.8

You can get the library with the following cvs command:

cvs -z3 -d
:pserver:anonymous@...:/var/cvs/e
co 
e17/libs/evas

the configure script checks dlopen. I have a fix for that in my hd. The 
ICE is not related to dlopen at all. Just remove that check in 
configure.in

The error message is the following:

make[4]: Entering directory 
`/d/vincent/upload/e17/libs/evas/src/lib/canvas'
/bin/sh ../../../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. 
(Continue reading)

Earnie Boyd | 2 Jan 2007 15:25
Picon

Re: ICE when trying to compile evas library

Quoting Vincent Torri <vtorri@...>:

>
> Hey, I'm trying to port evas to Windows. I get an ICE. Here are some
> informations about the problem:
>
> OS: windows XP
> gcc: version 3.4.5 (mingw special)
> ld: version 2.17.50 20060824
> MinGW: 5.1.2
> MSYS: 1.0.11
> MSYS version: MINGW32_NT-5.1 SALON 1.0.11(0.46/3/2) 2004-04-30 18:55 i686
> unknown
> mingw runtime: 3.11
> w32 api: 3.8
>
> You can get the library with the following cvs command:
>
> cvs -z3 -d
:pserver:anonymous@...:/var/cvs/e co
> e17/libs/evas
>
> the configure script checks dlopen. I have a fix for that in my hd. The
> ICE is not related to dlopen at all. Just remove that check in
> configure.in
>

Not sure why you're removing checks from configure, seems that it would 
be important.  Anyway ...

(Continue reading)

Vincent Torri | 2 Jan 2007 15:35
Picon

Re: ICE when trying to compile evas library


On Tue, 2 Jan 2007, Earnie Boyd wrote:

> Quoting Vincent Torri <vtorri@...>:
>
>>
>> Hey, I'm trying to port evas to Windows. I get an ICE. Here are some
>> informations about the problem:
>>
>> OS: windows XP
>> gcc: version 3.4.5 (mingw special)
>> ld: version 2.17.50 20060824
>> MinGW: 5.1.2
>> MSYS: 1.0.11
>> MSYS version: MINGW32_NT-5.1 SALON 1.0.11(0.46/3/2) 2004-04-30 18:55 i686
>> unknown
>> mingw runtime: 3.11
>> w32 api: 3.8
>>
>> You can get the library with the following cvs command:
>>
>> cvs -z3 -d
:pserver:anonymous@...:/var/cvs/e co
>> e17/libs/evas
>>
>> the configure script checks dlopen. I have a fix for that in my hd. The
>> ICE is not related to dlopen at all. Just remove that check in
>> configure.in
>>
>
(Continue reading)

Keith MARSHALL | 2 Jan 2007 15:46
Favicon

Re: ICE when trying to compile evas library

Vincent Torri wrote, quoting Earnie Boyd's reply to himself:
>>> The ICE is not related to dlopen at all. Just remove that check in
>>> configure.in
>>
>> Not sure why you're removing checks from configure, seems that it would
>> be important.  Anyway ...
>
> More precisely, i've not removed it, i've just done another check wrt 
the 
> host. I just said to remove that check if someone wants to test the 
> compilation without doing a lot of job. I'll have to patch some files to 

> use LoadLibrary (or another variant LoadLibraryA or LoadLibraryW).

Or, maybe try the `dlopen' replacement that Roger Wells posted here, a few
months ago :-)

Regards,
Keith.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
(Continue reading)

Vincent Torri | 2 Jan 2007 16:11
Picon

Re: ICE when trying to compile evas library


On Tue, 2 Jan 2007, Keith MARSHALL wrote:

> Or, maybe try the `dlopen' replacement that Roger Wells posted here, a few
> months ago :-)

will those files be included in mingw in some not so distant future ?

Vincent Torri

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


Gmane