git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Charles Bailey <cbailey32@bloomberg.net>
To: git@vger.kernel.org
Subject: AIX fixes
Date: Sat, 29 Mar 2014 15:38:59 +0000	[thread overview]
Message-ID: <1396107541-22974-1-git-send-email-cbailey32@bloomberg.net> (raw)

[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.

             reply	other threads:[~2014-03-29 15:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-29 15:38 Charles Bailey [this message]
2014-03-29 15:39 ` [PATCH 1/2] Remove inline from git_fnmatch in dir.c Charles Bailey
2014-03-29 15:39 ` [PATCH 2/2] Don't rely on strerror text when testing rmdir failure Charles Bailey
2014-03-29 15:48   ` Jens Lehmann
2014-03-29 15:58     ` Charles Bailey
2014-03-31 17:35     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396107541-22974-1-git-send-email-cbailey32@bloomberg.net \
    --to=cbailey32@bloomberg.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).