RSS/Atom feed Twitter
Site is read-only, email is disabled

Windows gimp-spawn.c compile Error

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Windows gimp-spawn.c compile Error Partha Bagchi 09 Mar 21:30
  Windows gimp-spawn.c compile Error Ell via gimp-developer-list 10 Mar 07:27
Partha Bagchi
2018-03-09 21:30:10 UTC (about 6 years ago)

Windows gimp-spawn.c compile Error

Hi Ell,

This one has me stumped. I get the following compile error:

gimp-spawn.c: In function 'gimp_spawn_set_cloexec':

gimp-spawn.c:244:26: error: 'HANDLE' undeclared (first use in this function)
SetHandleInformation ((HANDLE) _get_osfhandle (fd), HANDLE_FLAG_INHERIT, 0);
^~~~~~
gimp-spawn.c:244:26: note: each undeclared identifier is reported only once for each function it appears in gimp-spawn.c:244:34: error: expected ')' before '_get_osfhandle' SetHandleInformation ((HANDLE) _get_osfhandle (fd), HANDLE_FLAG_INHERIT, 0);

I think this means that the includes windows.h and io.h are not seen. If I change Line 34

#ifdef G_OS_WIN32

to

#ifdef __WIN32__

then it works for me. What do you think is going wrong?

Thanks, Partha

Ell via gimp-developer-list
2018-03-10 07:27:05 UTC (about 6 years ago)

Windows gimp-spawn.c compile Error

On Fri, 9 Mar 2018 16:30:10 -0500 Partha Bagchi wrote:

Hi Ell,

This one has me stumped. I get the following compile error:

gimp-spawn.c: In function 'gimp_spawn_set_cloexec':

gimp-spawn.c:244:26: error: 'HANDLE' undeclared (first use in this function)
SetHandleInformation ((HANDLE) _get_osfhandle (fd), HANDLE_FLAG_INHERIT, 0);
^~~~~~
gimp-spawn.c:244:26: note: each undeclared identifier is reported only once for each function it appears in gimp-spawn.c:244:34: error: expected ')' before '_get_osfhandle' SetHandleInformation ((HANDLE) _get_osfhandle (fd), HANDLE_FLAG_INHERIT, 0);

I think this means that the includes windows.h and io.h are not seen. If I change Line 34

#ifdef G_OS_WIN32

to

#ifdef __WIN32__

then it works for me. What do you think is going wrong?

The include order was wrong, so the Windows headers were indeed not included. Fixed by b590b5954202fa379284a13914d1c08b0b8b221e. Thanks :)

-- Ell