gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I../../../../gnulib/tests -I../.. -DIN_LIBVIRT_GNULIB_TESTS=1 -I. -I../../../../gnulib/tests -I../.. -I../../../../gnulib/tests/../.. -I../../gnulib/lib -I../../../../gnulib/tests/../../gnulib/lib -g -O2 -c -o test-getline.o ../../../../gnulib/tests/test-getline.c gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I../../../../gnulib/tests -I../.. -DIN_LIBVIRT_GNULIB_TESTS=1 -I. -I../../../../gnulib/tests -I../.. -I../../../../gnulib/tests/../.. -I../../gnulib/lib -I../../../../gnulib/tests/../../gnulib/lib -g -O2 -c -o test-getopt-posix.o ../../../../gnulib/tests/test-getopt-posix.c
/bin/bash ../../libtool --tag=CC --preserve-dup-deps --mode=link gcc -g -O2 -o test-getopt-posix test-getopt-posix.o libtests.a ../../gnulib/lib/libgnu.la libtests.a -ldl
With -E it generates: # 86 "../../../../gnulib/tests/test-getopt.h" posixly = !!getenv ("POSIXLY_CORRECT"); posixly = # 92 "../../../../gnulib/tests/test-getopt.h" 3 4 1 # 92 "../../../../gnulib/tests/test-getopt.h"
So it is at build time. A short check shows that it is __GETOPT_PREFIX that is defined and bringing the hard assign in. Also disabling the assignment makes the test work.
Need to find where the __GETOPT_PREFIX now comes from.
gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I../.. /../../ gnulib/ tests -I../.. -DIN_LIBVIRT_ GNULIB_ TESTS=1 -I. -I../.. /../../ gnulib/ tests -I../.. -I../.. /../../ gnulib/ tests/. ./.. -I../../gnulib/lib -I../.. /../../ gnulib/ tests/. ./../gnulib/ lib -g -O2 -c -o test-getline.o ../../. ./../gnulib/ tests/test- getline. c /../../ gnulib/ tests -I../.. -DIN_LIBVIRT_ GNULIB_ TESTS=1 -I. -I../.. /../../ gnulib/ tests -I../.. -I../.. /../../ gnulib/ tests/. ./.. -I../../gnulib/lib -I../.. /../../ gnulib/ tests/. ./../gnulib/ lib -g -O2 -c -o test-getopt-posix.o ../../. ./../gnulib/ tests/test- getopt- posix.c
gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I../..
/bin/bash ../../libtool --tag=CC --preserve-dup-deps --mode=link gcc -g -O2 -o test-getopt-posix test-getopt-posix.o libtests.a ../../gnulib/ lib/libgnu. la libtests.a -ldl
With -E it generates: ../../gnulib/ tests/test- getopt. h" CORRECT" ); ../../gnulib/ tests/test- getopt. h" 3 4 ../../gnulib/ tests/test- getopt. h"
# 86 "../../
posixly = !!getenv ("POSIXLY_
posixly =
# 92 "../../
1
# 92 "../../
So it is at build time.
A short check shows that it is __GETOPT_PREFIX that is defined and bringing the hard assign in.
Also disabling the assignment makes the test work.
Need to find where the __GETOPT_PREFIX now comes from.