lilypond-devel
[Top][All Lists]
Advanced

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

Re: error while running make check (g++ 4.7.0): missing include of unist


From: Frédéric Bron
Subject: Re: error while running make check (g++ 4.7.0): missing include of unistd.h
Date: Mon, 30 Jul 2012 08:50:01 +0200

> I wanted to run regression tests and compare before and after a change.
> However, I obtained the error given below after make -j8 CPU_COUNT=8 check
>
> I suspect this is because I am compiling with gcc/g++ 4.7.0 (coming
> with Fedora 17) and its release notes say:
> "Avoid polluting the global namespace and do not include <unistd.h>."
> we should then include
>        #include <sys/types.h>
>        #include <unistd.h>
> before using getpid and getcwd.

Who can review my patch?
http://codereview.appspot.com/6434048

Frédéric

> In file included from
> /home/fred/lilypond/flower/include/yaffut-parameters.hh:4:0,
>                  from /home/fred/lilypond/flower/test-file-name.cc:3:
> /home/fred/lilypond/flower/include/yaffut.hh: In member function 'int
> yaffut::Factory::Main(int, const char**)':
> /home/fred/lilypond/flower/include/yaffut.hh:211:39: warning:
> conversion to 'int' from 'size_t {aka long unsigned int}' may alter
> its value [-Wconversion]
> In file included from /home/fred/lilypond/flower/test-string.cc:8:0:
> /home/fred/lilypond/flower/include/yaffut.hh: In member function 'int
> yaffut::Factory::Main(int, const char**)':
> /home/fred/lilypond/flower/include/yaffut.hh:211:39: warning:
> conversion to 'int' from 'size_t {aka long unsigned int}' may alter
> its value [-Wconversion]
> In file included from /home/fred/lilypond/flower/test-std.cc:13:0:
> /home/fred/lilypond/flower/include/yaffut.hh: In member function 'int
> yaffut::Factory::Main(int, const char**)':
> /home/fred/lilypond/flower/include/yaffut.hh:211:39: warning:
> conversion to 'int' from 'size_t {aka long unsigned int}' may alter
> its value [-Wconversion]
> /home/fred/lilypond/flower/include/yaffut.hh: In function 'int
> main(int, const char**)':
> /home/fred/lilypond/flower/include/yaffut.hh:401:34: error: 'getpid'
> was not declared in this scope
> In file included from /home/fred/lilypond/flower/test-file-path.cc:5:0:
> /home/fred/lilypond/flower/include/yaffut.hh: In member function 'int
> yaffut::Factory::Main(int, const char**)':
> /home/fred/lilypond/flower/include/yaffut.hh:211:39: warning:
> conversion to 'int' from 'size_t {aka long unsigned int}' may alter
> its value [-Wconversion]
> /home/fred/lilypond/flower/test-file-path.cc: In constructor
> '{anonymous}::Find::Find()':
> /home/fred/lilypond/flower/test-file-path.cc:13:29: error: 'getcwd'
> was not declared in this scope
> make[1]: *** [out/test-file-path.o] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make[1]: *** [out/test-std.o] Error 1



reply via email to

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