Skip to content

Commit

Permalink
Check each _PATH_* define individually (Solaris has paths.h but not a…
Browse files Browse the repository at this point in the history
…ll of the

defines). From Eric N Vander Weele.
  • Loading branch information
nicm committed Dec 3, 2019
1 parent 875139f commit 92ecd61
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,31 @@ void warn(const char *, ...);
void warnx(const char *, ...);
#endif

#ifndef HAVE_PATHS_H
#define _PATH_BSHELL "/bin/sh"
#define _PATH_TMP "/tmp/"
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif

#ifndef _PATH_BSHELL
#define _PATH_BSHELL "/bin/sh"
#endif

#ifndef _PATH_TMP
#define _PATH_TMP "/tmp/"
#endif

#ifndef _PATH_DEVNULL
#define _PATH_DEVNULL "/dev/null"
#endif

#ifndef _PATH_TTY
#define _PATH_TTY "/dev/tty"
#endif

#ifndef _PATH_DEV
#define _PATH_DEV "/dev/"
#endif

#ifndef _PATH_DEFPATH
#define _PATH_DEFPATH "/usr/bin:/bin"
#endif

Expand Down Expand Up @@ -98,10 +117,6 @@ void warnx(const char *, ...);
#include "compat/bitstring.h"
#endif

#ifdef HAVE_PATHS_H
#include <paths.h>
#endif

#ifdef HAVE_LIBUTIL_H
#include <libutil.h>
#endif
Expand Down

0 comments on commit 92ecd61

Please sign in to comment.