public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sln: Preprocessor cleanups
@ 2016-07-13 12:17 Florian Weimer
  2016-08-04 13:48 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2016-07-13 12:17 UTC (permalink / raw)
  To: libc-alpha

2016-07-13  Florian Weimer  <fweimer@redhat.com>

	* elf/sln.c: Remove HAV_CONFIG_H, S_ISDIR, S_ISLNK preprocessor
	conditionals.  Do not define PATH_MAX.

diff --git a/elf/sln.c b/elf/sln.c
index f52cb9f..fa4ccec 100644
--- a/elf/sln.c
+++ b/elf/sln.c
@@ -16,10 +16,6 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
 #include <error.h>
 #include <errno.h>
 #include <libintl.h>
@@ -37,10 +33,6 @@
 
 #define PACKAGE _libc_intl_domainname
 
-#if !defined S_ISDIR && defined S_IFDIR
-#define	S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-
 static int makesymlink (const char *src, const char *dest);
 static int makesymlinks (const char *file);
 static void usage (void);
@@ -89,9 +81,6 @@ usage (void)
 static int
 makesymlinks (const char *file)
 {
-#ifndef PATH_MAX
-#define PATH_MAX 4095
-#endif
   char *buffer = NULL;
   size_t bufferlen = 0;
   int ret;
@@ -190,11 +179,7 @@ makesymlink (const char *src, const char *dest)
       return -1;
     }
 
-#ifdef S_ISLNK
   if (symlink (src, dest) == 0)
-#else
-  if (link (src, dest) == 0)
-#endif
     {
       /* Destination must exist by now. */
       if (access (dest, F_OK))

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sln: Preprocessor cleanups
  2016-07-13 12:17 [PATCH] sln: Preprocessor cleanups Florian Weimer
@ 2016-08-04 13:48 ` Mike Frysinger
  2016-09-21  8:43   ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2016-08-04 13:48 UTC (permalink / raw)
  To: Florian Weimer; +Cc: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 204 bytes --]

On 13 Jul 2016 14:17, Florian Weimer wrote:
> 2016-07-13  Florian Weimer  <fweimer@redhat.com>
> 
> 	* elf/sln.c: Remove HAV_CONFIG_H, S_ISDIR, S_ISLNK preprocessor

"HAVE"

lgtm otherwise
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sln: Preprocessor cleanups
  2016-08-04 13:48 ` Mike Frysinger
@ 2016-09-21  8:43   ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2016-09-21  8:43 UTC (permalink / raw)
  To: libc-alpha

On 08/04/2016 03:48 PM, Mike Frysinger wrote:
> On 13 Jul 2016 14:17, Florian Weimer wrote:
>> 2016-07-13  Florian Weimer  <fweimer@redhat.com>
>>
>> 	* elf/sln.c: Remove HAV_CONFIG_H, S_ISDIR, S_ISLNK preprocessor
>
> "HAVE"

Thanks, committed with this change.

Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-21  8:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 12:17 [PATCH] sln: Preprocessor cleanups Florian Weimer
2016-08-04 13:48 ` Mike Frysinger
2016-09-21  8:43   ` Florian Weimer

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