bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

definition of waitpid in sys_wait.in.h for C++ on windows


From: Tatsuro MATSUOKA
Subject: definition of waitpid in sys_wait.in.h for C++ on windows
Date: Wed, 29 Sep 2010 15:28:38 +0900 (JST)

Hello

I am tring to build octave-3.3.52+ on MinGW (GCC-4.5.0) which uses the
gnulib.
In compliling oct-env.cc  I have met the following error

libtool: compile:  g++ -shared-libgcc -DHAVE_CONFIG_H -I.
-I../../../hg/octave-work/liboctave -I.. -I/c/Programs/gpnewlib/include
-I/c/Programs/OctaveLibs/include -I/GnuWin32/include -I../libgnu
-I../../../hg/octave-work/libgnu -I../../../hg/octave-work/libcruft/misc
-I/c/Programs/gpnewlib/include -I/c/Programs/OctaveLibs/include
-I/GnuWin32/include -O3 -fomit-frame-pointer -DHAVE_CONFIG_H -mieee-fp
-IC:/Programs/GnuWin32/include -I/c/Programs/gpnewlib/include/freetype2
-I/c/Programs/gpnewlib/include -IC:/Programs/gpnewlib/include -Wall -W
-Wshadow -Wold-style-cast -Wformat -O3 -fomit-frame-pointer -O3
-fomit-frame-pointer -MT liboctave_la-oct-env.lo -MD -MP -MF
.deps/liboctave_la-oct-env.Tpo -c
../../../hg/octave-work/liboctave/oct-env.cc  -DDLL_EXPORT -DPIC -o
.libs/liboctave_la-oct-env.o
In file included from ../../../hg/octave-work/liboctave/oct-env.cc:61:0:
../../../hg/octave-work/liboctave/oct-syscalls.h:61:62: error: macro
"waitpid" passed 4 arguments, but takes just 3
../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected
identifier before numeric constant
../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected ','
or '...' before numeric constant
../../../hg/octave-work/liboctave/oct-env.cc: In member function
'std::string octave_env::do_get_host_name() const':
../../../hg/octave-work/liboctave/oct-env.cc:455:20: error: 'gethostname'
is not a member of 'gnulib'


I have reported the above in the octave-maintainer ML,
John suggested that for the first error
******************
| In sys/wait.h in the directory 'libgnu' in the build tree, I found 
| 
| ... 
| 
| # define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD) 

We need to discuss this with the gnulib maintainers.  For C++, it 
would be helpful if this were a function instead of a macro. 
******************
In file included from ../../../hg/octave-work/liboctave/oct-env.cc:61:0:
../../../hg/octave-work/liboctave/oct-syscalls.h:61:62: error: macro
"waitpid" passed 4 arguments, but takes just 3

In oct-syscalls.h, there defined

60:  static pid_t waitpid (pid_t, int *status, int);
61:  static pid_t waitpid (pid_t, int *status, int, std::string&);
***************

Perhaps John pointed for line 61 of oct-syscalls.h.
*********
For C++, it 
would be helpful if this were a function instead of a macro. 
***********

What should I do for C++ ?

Regards

Tatsuro

--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]