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

AIX fixes

From
Charles Bailey <cbailey32@bloomberg.net>
Date
Mar 29, 2014, 15:38 UTC
Message-ID
<1396107541-22974-1-git-send-email-cbailey32@bloomberg.net>
[PATCH 1/2] Remove inline from git_fnmatch in dir.c

There are currently a few issues with building on AIX. These two patches address two of them. The first removes 'inline' from a function in dir.c. The function has grown such that I don't really see a benefit in explicitly encouraging the compiler to inline. (As it is in a .c file, it's only going to be inlined for sophisticated toolchains doing LTO or similar for other translation units and with this sophistication the inline hinting behaviour is probably not so important.)

The problem with having this function declared inline is a compliance issue.

6.7.4 of C99 says:
> An inline definition of a function with external linkage shall not
> contain a definition of a modifiable object with static storage
> duration, and shall not contain a reference to an identifier with
> internal linkage.

git_fnmatch contains calls to ps_strncmp and ps_strcmp which are all declared static so violate this and xlC complains about this.

[PATCH 2/2] Don't rely on strerror text when testing rmdir failure

The second issue is that AIX doesn't distinguish between EEXIST and WNOTEMPTY so two tests that rely on the exact text of strerror for rmdir's failure to remove a non-empty directory fail. My personal take was that the exact text of strerror was not too important but we can test the leading portion of the error message which is under the control of Git and verifies that the readdir function reported a failure.

I also have an issue where two low level tests (t0020-crlf and t0022-crlf-rename) fail (and perhaps later tests, too) unless I de-inline ce_path_match and dir_path_match from dir.h but as I cannot yet explain what the issue is or why this is a fix, I'm holding onto this one for now.

Charles.
Next: Charles Bailey
Message 1 of 6 in “AIX fixes”
  1. Charles BaileyMar 29, 2014
  2. 1/2 Remove inline from git_fnmatch in dir.cCharles Bailey, Mar 29, 2014
  3. 2/2 Don't rely on strerror text when testing rmdir failureCharles Bailey, Mar 29, 2014
  4. Jens LehmannMar 29, 2014
  5. Charles BaileyMar 29, 2014
  6. Junio C HamanoMar 31, 2014

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.