hg: bsd-port/jdk8/hotspot: 2 new changesets
Jung-uk Kim
jkim at FreeBSD.org
Thu Jul 2 18:00:39 UTC 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 03/14/2015 13:19, glewis at eyesbeyond.com wrote:
> Changeset: 10acfe2761d0 Author: Greg Lewis
> <glewis at eyesbeyond.com> Date: 2015-03-14 10:19 -0700 URL:
> http://hg.openjdk.java.net/bsd-port/jdk8/hotspot/rev/10acfe2761d0
>
> . Use the actual lwp API from userland rather than resorting to
> SYSCALL on NetBSD. . Since gcc 4.8+ warns about the use of #if and
> undefined variables, use the equivalent #ifdef constructs instead.
>
> Authored by: Christos Zoulas <christos at zoulas.com>
>
> ! src/os/bsd/vm/os_bsd.cpp
"#elifdef" is wrong. "#elif defined(FOO)" must be used instead.
% cat test.cpp
#ifdef __FreeBSD__
#include <sys/types.h>
#elifdef __NetBSD__
#warning "should not reach here!"
#endif
int do_nada(void);
int
do_nada(void)
{
return (0);
}
% clang++ -Wall -c test.cpp
test.cpp:3:2: error: invalid preprocessing directive
#elifdef __NetBSD__
^
test.cpp:4:2: warning: "should not reach here!" [-W#warnings]
#warning "should not reach here!"
^
1 warning and 1 error generated.
% g++48 -Wall -c test.cpp
test.cpp:3:2: error: invalid preprocessing directive #elifdef
#elifdef __NetBSD__
^
test.cpp:4:2: warning: #warning "should not reach here!" [-Wcpp]
#warning "should not reach here!"
^
Note if you ignore unknown preprocessor directives via a compile
option, it can be really disastrous.
Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJVlXxGAAoJEHyflib82/FG2XsH/3+lZ35165sWyp3odDDcxwFv
LqfLfoOjZMBQ21CTDkIyrrIboWEu1K/px7IrytXgWgYBAulYbvvIr28TJAwkXPmR
bcJkCYongfjOdstircs4H/+zZ2QEpfU4oTixMhlg8IbI/DtY7kDVi/PYHMumJZUa
Tl6vtG81bxjgYyuJY1fDjP9hixeARm+zayOa2RhFHZpGcCzE5El5eCKTzblDUo14
+YftiKhrWrckP8Mtj83f8m/alEoZE4+QzyYyjYaemv6ADvwv4Qi2dhS2XiU0k2Y2
7iQ/hIibl54mCu2DPw4H3auK0TwWuRuJJtiYjEI8kSwG7QieeBFEM1d8fWqPcHY=
=zfLM
-----END PGP SIGNATURE-----
More information about the bsd-port-dev
mailing list