[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs & MAXPATHLEN

From: Richard M. Stallman
Subject: Re: emacs & MAXPATHLEN
Date: Fri, 29 Jul 2005 09:54:05 -0400

You're right that xsmfns.c needs to be fixed too.  I overlooked that

    +#ifdef _GNU_SOURCE

The purpose of _GNU_SOURCE is to control the behavior of
system header files.  User programs should not test it, only set it.
We could have config test for the existence of get_current_dir_name.

+      buf = malloc(strlen(pwd)+1);
+      if(!buf)
+        fatal ("`malloc' failed in init_buffer\n");

Our convention for whitespace is

+      buf = malloc (strlen (pwd)+1);
+      if (!buf)
+        fatal ("`malloc' failed in init_buffer\n");

However, the main thing is that you haven't got rid of the
arbitrary limit.  You allocate the buffer dynamically,
but you don't make it bigger if the data doesn't fit.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]