all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mikhail Gusarov <dottedmag@dottedmag.net>
To: John Wiegley <johnw@gnu.org>
Cc: 30350@debbugs.gnu.org, Philipp Stephani <p.stephani2@gmail.com>
Subject: bug#30350: Build breakage of master on MacOS 10.13
Date: Tue, 06 Feb 2018 22:30:19 +0100	[thread overview]
Message-ID: <1517952619.2856663.1261882640.64BBBD37@webmail.messagingengine.com> (raw)
In-Reply-To: <1517952360.2855302.1261878048.393BF9AA@webmail.messagingengine.com>

On Tue, 6 Feb 2018, at 22:26, Mikhail Gusarov wrote:

> I'm saying that on OS X stat'ing /bin/zsh and /bin/zsh/ (or /bin/zsh/.) 
> gives different results:

And here is a test program and its output:

#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>

static void teststat(const char *filename)
{
    struct stat st;
    errno = 0;
    int res = stat(filename, &st);
    printf("%s stat->%d errno->%d\n", filename, res, errno);
}

int main()
{
    teststat("/bin/zsh");
    teststat("/bin/zsh/");
    teststat("/bin/zsh/.");
    return 0;
}

% ./a
/bin/zsh stat->0 errno->0
/bin/zsh/ stat->-1 errno->20
/bin/zsh/. stat->-1 errno->20
%

errno 20 is ENOTDIR.





  parent reply	other threads:[~2018-02-06 21:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06  6:31 Build breakage of master on MacOS 10.13 Mikhail Gusarov
2018-02-06  8:08 ` Philipp Stephani
2018-02-06 15:27   ` bug#30350: " Mikhail Gusarov
2018-02-06 17:40     ` John Wiegley
2018-02-06 21:26       ` Mikhail Gusarov
2018-02-06 21:29         ` Philipp Stephani
2018-02-06 21:31           ` Mikhail Gusarov
2018-02-06 21:30         ` Mikhail Gusarov [this message]
2018-02-06 18:56     ` Alan Third
2018-02-06 21:15       ` Philipp Stephani
2018-02-06 21:14     ` Philipp Stephani

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

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

  git send-email \
    --in-reply-to=1517952619.2856663.1261882640.64BBBD37@webmail.messagingengine.com \
    --to=dottedmag@dottedmag.net \
    --cc=30350@debbugs.gnu.org \
    --cc=johnw@gnu.org \
    --cc=p.stephani2@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.