all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andy Moreton <andrewjmoreton@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: master b9ac4f8.. (Fix locating pdump by symlink) breaks with stow
Date: Mon, 24 Jun 2019 15:14:47 +0100	[thread overview]
Message-ID: <vz1mui7xe7c.fsf@gmail.com> (raw)
In-Reply-To: fc52ff97a11aed2dea952de42b15995c.squirrel@dancol.org

On Mon 24 Jun 2019, Daniel Colascione wrote:

>> On Mon, Jun 24, 2019 at 06:57:32PM +0700, Yuri Khan wrote:
>>>On Mon, Jun 24, 2019 at 6:12 PM Ergus <spacibba@aol.com> wrote:
>>>
>>>> 750|  char* argv0 = realpath (argv[0], NULL);
>>>> 751|  if (!argv0)
>>>> 752|    fatal ("could not resolve realpath of \"%s\": %s",
>>>> 752|           argv0, strerror (errno));
>>>
>>>This looks wrong. If we called realpath and it returned null, we???d
>>>probably want the original argv[0] in the error message, not the null
>>>result.
>>>
>>
>> This also produces problems when using emacs from an alias like em o emc
>> which is a very common practice.
>>
>> So there should be actually other conditions to try if the first
>> realpath call fails and not abort (call fatal) in the first try.
>
> Try it now. Sorry about the botched change.

Building commit 65d45def8d71e50d111adf1141011a5d30a27447 still fails on
MSYS2 (Windows), and adds warnings:

C:/emacs/git/emacs/master/lib/canonicalize-lgpl.c:51:21: warning: no previous prototype for 'realpath' [-Wmissing-prototypes]
   51 | # define __realpath realpath
      |                     ^~~~~~~~
C:/emacs/git/emacs/master/lib/canonicalize-lgpl.c:117:1: note: in expansion of macro '__realpath'
  117 | __realpath (const char *name, char *resolved)
      | ^~~~~~~~~~
C:/emacs/git/emacs/master/lib/canonicalize-lgpl.c:50:35: warning: no previous prototype for 'canonicalize_file_name' [-Wmissing-prototypes]
   50 | # define __canonicalize_file_name canonicalize_file_name
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
C:/emacs/git/emacs/master/lib/canonicalize-lgpl.c:416:1: note: in expansion of macro '__canonicalize_file_name'
  416 | __canonicalize_file_name (const char *name)
      | ^~~~~~~~~~~~~~~~~~~~~~~~

[...]

C:/emacs/git/emacs/master/src/emacs.c: In function 'load_pdump':
C:/emacs/git/emacs/master/src/emacs.c:851:22: warning: implicit declaration of function 'realpath' [-Wimplicit-function-declaration]
  851 |       real_exename = realpath (exename, NULL);
      |                      ^~~~~~~~
C:/emacs/git/emacs/master/src/emacs.c:851:22: warning: nested extern declaration of 'realpath' [-Wnested-externs]
C:/emacs/git/emacs/master/src/emacs.c:851:20: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  851 |       real_exename = realpath (exename, NULL);
      |                    ^
C:/emacs/git/emacs/master/src/emacs.c:923:7: error: 'argv0_len' undeclared (first use in this function)
  923 |       argv0_len = strlen (argv0_base);
      |       ^~~~~~~~~
C:/emacs/git/emacs/master/src/emacs.c:923:7: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:402: emacs.o] Error 1




  parent reply	other threads:[~2019-06-24 14:14 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 10:26 master b9ac4f8.. (Fix locating pdump by symlink) breaks with stow Yuri D'Elia
2019-06-24 11:10 ` Ergus
2019-06-24 11:57   ` Yuri Khan
2019-06-24 12:28     ` Ergus
2019-06-24 13:21       ` Daniel Colascione
2019-06-24 13:50         ` Ergus
2019-06-24 13:54           ` Daniel Colascione
2019-06-24 14:05             ` Ergus
2019-06-24 14:19             ` Ergus
2019-06-24 14:14         ` Andy Moreton [this message]
2019-06-24 14:52           ` Eli Zaretskii
2019-06-24 16:06             ` dancol
2019-06-24 17:23               ` Eli Zaretskii
2019-06-24 18:12                 ` Daniel Colascione
2019-06-24 18:25                 ` Eli Zaretskii
2019-06-24 17:12             ` Eli Zaretskii
2019-06-24 18:26               ` Andy Moreton
2019-06-24 18:44                 ` Eli Zaretskii
2019-06-26 16:26               ` Eli Zaretskii
2019-06-26 16:58                 ` Eli Zaretskii
2019-06-27 17:45                   ` Ken Brown
2019-06-27 18:36                     ` Eli Zaretskii
2019-06-27 19:56                       ` Ken Brown
2019-06-24 15:01           ` Basil L. Contovounesios

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=vz1mui7xe7c.fsf@gmail.com \
    --to=andrewjmoreton@gmail.com \
    --cc=emacs-devel@gnu.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 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.