From: Keith M. <kei...@us...> - 2016-09-20 21:21:50
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 20/09/16 19:48, DAVENPORT, MARC wrote: > Also as a related question, when is _NO_OLDNAMES defined? Only when *you* choose to define it, (and why on earth would you do that, unless you've been brainwashed into the Microsoft mindset, to believe that POSIX type names are bad?) > Does std=c++11 define that? No. > I ask because allegro 5 programs don't compile when off_t is not > defined, and sys/types.h only defines off_t when _NO_OLDNAMES is > undefined. That's not what I see, in the current mingwrt-3.22.1 <sys/types.h>; off_t is a POSIX type name, and it is defined when _POSIX_C_SOURCE is defined. This is off-topic for this thread, but since you ask: to comply with POSIX, any application which depends on POSIX features is *supposed* to define _POSIX_C_SOURCE (or corresponding _XOPEN_SOURCE, for which _POSIX_C_SOURCE is implied) *before* it includes *any* header. FWIW, MinGW will implicitly define _POSIX_C_SOURCE, *unless* you choose to compile with any option which implies __STRICT_ANSI__; if you choose the latter course, then *you* must *explicitly* take care to define _POSIX_C_SOURCE, if you expect to use POSIX data types. I can only speculate that allegro 5 violates this POSIX.1 requirement. - -- Regards, Keith. Public key available from keys.gnupg.net Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQIcBAEBAgAGBQJX4ahcAAoJEMCtNsY0flo/fLcP/jMw7nARvxwrGd4ynWht01n4 Xtug8C7bx4s63qPg45DN3NvJiARRQqoqYdePU1eBK0aW4ipbbKF+UJgSHEwe4k6+ Q4f3XxhjJS2TUPFn5ouI/YjCv+LvVot29pk5PaoA3yd6MYzUcrbMghsf3d48yYWN q/KXNEwR8pujFUdgd86hUafriMPILaEcca91J60cA4E24pamVkLHXzZp6eEB+/l9 9ywd+aetzRoaUIhDGhfTAf55+2LTtIwAivtKJ9RdGzBskSU75H8Xbyrbru9TI4VG VArMj4tSFOgBGZq5Rtf9lfH8JUvRLuTnL8RA8+g5nDdeftpj//xznUEcNz7GMhdh L6frnBLRg7SSn95xYR9gZ+MNEI3xQmCMjheagCbmRi5oHKm+5Z+wvI9tNBB1a0XG ynuwBT2ca2o8UY1kkE2gqylk4hK16xQFbSGPg2CNn5ZswBznTntE7D6wZCxaCY1b jG2rupV/wHmMhT/YaS5D3+tHorSipMOhzY8tUYrDnj+OHjXXPOra/rOKC7h1Rmst 20oDaD5L7urcFyapmLodZs0MiGF2L9MiTuaplDlLTeEXcR8ifnXxCAzHWVwfBLrg +visc24hJFsaMJxpejF80wCbF6TPAtIZj1/EPhasePgxmzU5oH45f+QPt3yuWOMZ NL6EPSJ9DX7+zwKcJMYb =7FFu -----END PGP SIGNATURE----- |