octave-maintainers
[Top][All Lists]
Advanced

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

Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32


From: Tatsuro MATSUOKA
Subject: Re: compile error on oct-env.cc in building octave-3.3.52+ on MinGW32
Date: Thu, 23 Sep 2010 00:30:07 +0900 (JST)

Hello

Thank you for your reply.

--- "John W. Eaton" wrote:
nstant
> | ../../../hg/octave-work/liboctave/oct-syscalls.h:60:16: error: expected ',' 
> or '...' before
> numeric
> | constant
> 
> It looks like the gnulib sys/wait.h is defining waitpid, even for C++.
> Probably it should not do that.

In sys/wait.h in the directory 'libgnu' in the build tree, I found 

*****************************
# ifdef __cplusplus
extern "C" {
# endif

/* Declarations of functions.  */

# ifdef __cplusplus
}
# endif

#else
/* Native Windows API.  */

# include <process.h>

# define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)

/* The following macros apply to an argument x, that is a status of a process,
   as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess().
   This value is simply an 'int', not composed of bit fields.  */

/* When an unhandled fatal signal terminates a process, the exit code is 3.  */
# define WIFSIGNALED(x) ((x) == 3)
# define WIFEXITED(x) ((x) != 3)
# define WIFSTOPPED(x) 0

/* The signal that terminated a process is not known posthum.  */
# define WTERMSIG(x) SIGTERM

# define WEXITSTATUS(x) (x)

/* There are no core dumps.  */
# define WCOREDUMP(x) 0

#endif

# include <process.h>

# define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)

*********************************************************

I attached sys/wait.h as a refrence.





> 
> | ../../../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'
> 
> The unistd.h file from gnulib should provide gnulib::gethostname.  Are
> the following defined in your configh.h file?
> 
>   GNULIB_TEST_GETHOSTNAME
>   HAVE_GETHOSTNAME
>   HAVE_RAW_DECL_GETHOSTNAME
> 
In config.h, I found the following:

/* Define to 1 when the gnulib module gethostname should be tested. */
#define GNULIB_TEST_GETHOSTNAME 1

/* Define to 1 if you have the `gethostname' function. */
/* #undef HAVE_GETHOSTNAME */

/* Define to 1 if gethostname is declared even after undefining macros. */
/* #undef HAVE_RAW_DECL_GETHOSTNAME */

Any suggestions?

Regards

Tatsuro

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

Attachment: wait.h
Description: 3336755143-wait.h


reply via email to

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