Subject: 26.0.50; GNU LIB build fails on macOS 10.12.4

From: Harald Maier <[email-masked]>
Date: Sat, 8 Apr 2017 09:14:25 +0200

The latest git checkout fails on mac OS 10.12.4.

  CC       fstatat.o
In file included from fstatat.c:45:
In file included from ./fcntl.h:67:
In file included from ./unistd.h:135:
In file included from ./getopt_pfx_core.h:52:
./getopt_core.h:91:79: error: expected ';' after top level declarator
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
                                                                              ^
./getopt_core.h:92:28: error: expected identifier or '('
       __THROW __nonnull ((2, 3));
                           ^
./getopt_core.h:92:28: error: expected ')'
./getopt_core.h:92:27: note: to match this '('
       __THROW __nonnull ((2, 3));
                          ^
3 errors generated.
make[2]: *** [fstatat.o] Error 1
make[1]: *** [lib] Error 2

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin16.5.0

In GNU Emacs 26.0.50 (build 2, x86_64-apple-darwin16.4.0, X toolkit, Xaw3d scroll bars)
 of 2017-03-26 built on ate.maierh
Repository revision: 082e2cb3f40b717e4c00d31532927c9693b7cb9b
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
Recent messages:
Omitting...
Omitted 54 lines.
Mark saved where search started
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set
previous-line: Beginning of buffer
Mark saved where search started
Quit [2 times]
Configured using:
 'configure --without-ns --with-x-toolkit=lucid
 --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib --without-pop
 --without-gsettings --with-jpeg=no --with-png=no --with-gif=no
 --with-tiff=no'