git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH 1/2] Teach Solaris that _XOPEN_SOURCE=600 really menas XPG6

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
May 28, 2009, 19:40 UTC
Message-ID
<kZP6fFCtTQSG03irLxGArpacn-5pYEauMj-b0VWwhzPWMGiC_XnsYw@cipher.nrlssc.navy.mil>
In-Reply-To
<20090528191940.GG13499@coredump.intra.peff.net>
Jeff King wrote:
Show 13 quoted lines
> On Thu, May 28, 2009 at 11:46:50AM -0500, Brandon Casey wrote:
> 
>> So we either require compiling with a c99 compiler (by ensuring that
>> _XPG6 is set) or exclude compiling with a c99 compiler on sun (by
>> ensuring that _XPG6 is not set).  Actually, this would only affect Solaris
>> versions which support XPG6.  Solaris 11 and 10 do.  I don't know about
>> Solaris 9 and 8.  Solaris 7 doesn't.
>>
>> Which do we want to do?
> 
> FWIW, I didn't even try using sun's cc. I have been doing all of my
> builds using gcc 3.1.1 (from around 2002, which is what happens to be
> available on the old-ish Solaris install at my university).
It's not the compiler that prevents compilation.  It's the header files.

You mentioned that on Solaris 8 there was only a single declaration for iconv. There was not a macro check for _XPG6. I suspect that Solaris 8 does not support XPG6, so your compilation is just falling back to XPG4. The same thing happens on Solaris 7. On Solaris 10, if the macros are set such that _XPG6 becomes set, then compilation will fail if the compiler is not a c99 one.

-brandon
Previous: Jeff KingNext: Jeff King
Message 6 of 15 in “OpenSolaris 2008.11 portability fixes”
  1. 0/2 OpenSolaris 2008.11 portability fixesJunio C Hamano, May 23, 2009
  2. 1/2 Teach Solaris that _XOPEN_SOURCE=600 really menas XPG6Junio C Hamano, May 23, 2009
  3. 2/2 OpenSolaris 200811 (SunOS 5.11) does not want OLD_ICONVJunio C Hamano, May 23, 2009
  4. Brandon CaseyMay 28, 2009
  5. Jeff KingMay 28, 2009
  6. Brandon CaseyMay 28, 2009
  7. Jeff KingMay 28, 2009
  8. Junio C HamanoMay 28, 2009
  9. Tomas CarneckyJun 11, 2009
  10. Brandon CaseyJun 11, 2009
  11. Tomas CarneckyJun 11, 2009
  12. Brandon CaseyJun 11, 2009
  13. Tomas CarneckyJun 11, 2009
  14. Brandon CaseyJun 11, 2009
  15. Junio C HamanoJun 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.