OpenSSH 2.5.0p1

Damien Miller djm at mindrot.org
Sat Feb 17 09:56:58 EST 2001


On Fri, 16 Feb 2001 mouring at etoh.eviladmin.org wrote:

> > Can we just detect [ $(srcdir) = "." ] and not do the -I?
> 
> That was my thought.  But I was not sure if it would go into configure.in
> or the Makefile.in file.

Here is a patch that does this. Unfortunately as Gert pointed out, this
doesn't fix it for the builddir != srcdir case.

Index: Makefile.in
===================================================================
RCS file: /var/cvs/openssh/Makefile.in,v
retrieving revision 1.152
diff -u -r1.152 Makefile.in
--- Makefile.in	2001/02/15 03:01:59	1.152
+++ Makefile.in	2001/02/16 22:54:02
@@ -26,7 +26,7 @@
 CC=@CC@
 LD=@LD@
 CFLAGS=@CFLAGS@
-CPPFLAGS=@CPPFLAGS@ -I. -I$(srcdir)/openbsd-compat -I$(srcdir) $(PATHS) @DEFS@
+CPPFLAGS=@CPPFLAGS@ -I$(srcdir)/openbsd-compat $(PATHS) @DEFS@
 LIBS=@LIBS@
 AR=@AR@
 RANLIB=@RANLIB@
Index: configure.in
===================================================================
RCS file: /var/cvs/openssh/configure.in,v
retrieving revision 1.243
diff -u -r1.243 configure.in
--- configure.in	2001/02/16 01:12:41	1.243
+++ configure.in	2001/02/16 22:54:03
@@ -20,6 +20,10 @@
 AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
 AC_PATH_PROG(TEST_MINUS_S_SH, sh)
 
+if test -z "${srcdir}" -o "x${srcdir}" != "x." ; then
+	CPPFLAGS="-I. -I${srcdir} $CPPFLAGS";
+fi
+
 if test -z "$AR" ; then
 	AC_MSG_ERROR([*** 'ar' missing, please install or fix your \$PATH ***])
 fi
Index: openbsd-compat/Makefile.in
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- openbsd-compat/Makefile.in	2001/02/09 01:55:36	1.5
+++ openbsd-compat/Makefile.in	2001/02/16 22:54:03
@@ -9,7 +9,7 @@
 CC=@CC@
 LD=@LD@
 CFLAGS=@CFLAGS@
-CPPFLAGS=@CPPFLAGS@ -I. -I.. -I$(srcdir) -I$(srcdir)/.. @DEFS@
+CPPFLAGS=@CPPFLAGS@ -I$(srcdir) -I$(srcdir)/.. @DEFS@
 LIBS=@LIBS@
 AR=@AR@
 RANLIB=@RANLIB@
Index: openbsd-compat/base64.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/base64.h,v
retrieving revision 1.2
diff -u -r1.2 base64.h
--- openbsd-compat/base64.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/base64.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_BASE64_H
 #define _BSD_BASE64_H
 
-#include "config.h"
-
 #ifndef HAVE___B64_NTOP
 # ifndef HAVE_B64_NTOP
 int b64_ntop(u_char const *src, size_t srclength, char *target, 
Index: openbsd-compat/bindresvport.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/bindresvport.h,v
retrieving revision 1.2
diff -u -r1.2 bindresvport.h
--- openbsd-compat/bindresvport.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/bindresvport.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_BINDRESVPORT_H
 #define _BSD_BINDRESVPORT_H
 
-#include "config.h"
-
 #ifndef HAVE_BINDRESVPORT_SA
 int bindresvport_sa(int sd, struct sockaddr *sa);
 #endif /* !HAVE_BINDRESVPORT_SA */
Index: openbsd-compat/bsd-arc4random.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/bsd-arc4random.h,v
retrieving revision 1.2
diff -u -r1.2 bsd-arc4random.h
--- openbsd-compat/bsd-arc4random.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/bsd-arc4random.h	2001/02/16 22:54:03
@@ -27,8 +27,6 @@
 #ifndef _BSD_ARC4RANDOM_H
 #define _BSD_ARC4RANDOM_H
 
-#include "config.h"
-
 #ifndef HAVE_ARC4RANDOM
 unsigned int arc4random(void);
 void arc4random_stir(void);
Index: openbsd-compat/bsd-cygwin_util.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/bsd-cygwin_util.h,v
retrieving revision 1.2
diff -u -r1.2 bsd-cygwin_util.h
--- openbsd-compat/bsd-cygwin_util.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/bsd-cygwin_util.h	2001/02/16 22:54:03
@@ -15,8 +15,6 @@
 
 /* $Id: bsd-cygwin_util.h,v 1.2 2001/02/09 01:55:36 djm Exp $ */
 
-#include "config.h"
-
 #ifdef HAVE_CYGWIN
 
 int binary_open(const char *filename, int flags, ...);
Index: openbsd-compat/bsd-misc.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/bsd-misc.h,v
retrieving revision 1.2
diff -u -r1.2 bsd-misc.h
--- openbsd-compat/bsd-misc.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/bsd-misc.h	2001/02/16 22:54:03
@@ -27,8 +27,6 @@
 #ifndef _BSD_MISC_H
 #define _BSD_MISC_H
 
-#include "config.h"
-
 char *get_progname(char *argv0);
 
 #ifndef HAVE_SETSID
Index: openbsd-compat/bsd-snprintf.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/bsd-snprintf.h,v
retrieving revision 1.2
diff -u -r1.2 bsd-snprintf.h
--- openbsd-compat/bsd-snprintf.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/bsd-snprintf.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_SNPRINTF_H
 #define _BSD_SNPRINTF_H
 
-#include "config.h"
-
 #include <sys/types.h> /* For size_t */
 
 #ifndef HAVE_SNPRINTF
Index: openbsd-compat/daemon.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/daemon.h,v
retrieving revision 1.2
diff -u -r1.2 daemon.h
--- openbsd-compat/daemon.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/daemon.h	2001/02/16 22:54:03
@@ -3,7 +3,6 @@
 #ifndef _BSD_DAEMON_H
 #define _BSD_DAEMON_H
 
-#include "config.h"
 #ifndef HAVE_DAEMON
 int daemon(int nochdir, int noclose);
 #endif /* !HAVE_DAEMON */
Index: openbsd-compat/fake-getaddrinfo.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/fake-getaddrinfo.h,v
retrieving revision 1.2
diff -u -r1.2 fake-getaddrinfo.h
--- openbsd-compat/fake-getaddrinfo.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/fake-getaddrinfo.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _FAKE_GETADDRINFO_H
 #define _FAKE_GETADDRINFO_H
 
-#include "config.h"
-
 #include "fake-gai-errnos.h"
 
 #ifndef AI_PASSIVE
Index: openbsd-compat/fake-getnameinfo.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/fake-getnameinfo.h,v
retrieving revision 1.2
diff -u -r1.2 fake-getnameinfo.h
--- openbsd-compat/fake-getnameinfo.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/fake-getnameinfo.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _FAKE_GETNAMEINFO_H
 #define _FAKE_GETNAMEINFO_H
 
-#include "config.h"
-
 #ifndef HAVE_GETNAMEINFO
 int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, 
                 size_t hostlen, char *serv, size_t servlen, int flags);
Index: openbsd-compat/fake-socket.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/fake-socket.h,v
retrieving revision 1.2
diff -u -r1.2 fake-socket.h
--- openbsd-compat/fake-socket.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/fake-socket.h	2001/02/16 22:54:03
@@ -3,7 +3,6 @@
 #ifndef _FAKE_SOCKET_H
 #define _FAKE_SOCKET_H
 
-#include "config.h"
 #include "sys/types.h"
 
 #ifndef HAVE_STRUCT_SOCKADDR_STORAGE
Index: openbsd-compat/getcwd.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/getcwd.h,v
retrieving revision 1.2
diff -u -r1.2 getcwd.h
--- openbsd-compat/getcwd.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/getcwd.h	2001/02/16 22:54:03
@@ -2,7 +2,6 @@
 
 #ifndef _BSD_GETCWD_H 
 #define _BSD_GETCWD_H
-#include "config.h"
 
 #if !defined(HAVE_GETCWD)
 
Index: openbsd-compat/getgrouplist.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/getgrouplist.h,v
retrieving revision 1.2
diff -u -r1.2 getgrouplist.h
--- openbsd-compat/getgrouplist.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/getgrouplist.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_GETGROUPLIST_H
 #define _BSD_GETGROUPLIST_H
 
-#include "config.h"
-
 #ifndef HAVE_GETGROUPLIST
 
 #include <grp.h>
Index: openbsd-compat/inet_aton.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/inet_aton.h,v
retrieving revision 1.2
diff -u -r1.2 inet_aton.h
--- openbsd-compat/inet_aton.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/inet_aton.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_INET_ATON_H
 #define _BSD_INET_ATON_H
 
-#include "config.h"
-
 #ifndef HAVE_INET_ATON
 int inet_aton(const char *cp, struct in_addr *addr);
 #endif /* HAVE_INET_ATON */
Index: openbsd-compat/inet_ntoa.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/inet_ntoa.h,v
retrieving revision 1.2
diff -u -r1.2 inet_ntoa.h
--- openbsd-compat/inet_ntoa.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/inet_ntoa.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_INET_NTOA_H
 #define _BSD_INET_NTOA_H
 
-#include "config.h"
-
 #if defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA)
 char *inet_ntoa(struct in_addr in);
 #endif /* defined(BROKEN_INET_NTOA) || !defined(HAVE_INET_NTOA) */
Index: openbsd-compat/mktemp.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/mktemp.h,v
retrieving revision 1.2
diff -u -r1.2 mktemp.h
--- openbsd-compat/mktemp.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/mktemp.h	2001/02/16 22:54:03
@@ -3,7 +3,6 @@
 #ifndef _BSD_MKTEMP_H
 #define _BSD_MKTEMP_H
 
-#include "config.h"
 #ifndef HAVE_MKDTEMP
 int mkstemps(char *path, int slen);
 int mkstemp(char *path);
Index: openbsd-compat/openbsd-compat.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/openbsd-compat.h,v
retrieving revision 1.2
diff -u -r1.2 openbsd-compat.h
--- openbsd-compat/openbsd-compat.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/openbsd-compat.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _OPENBSD_H
 #define _OPENBSD_H
 
-#include "config.h"
-
 /* OpenBSD function replacements */
 #include "bindresvport.h"
 #include "getcwd.h"
Index: openbsd-compat/realpath.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/realpath.h,v
retrieving revision 1.2
diff -u -r1.2 realpath.h
--- openbsd-compat/realpath.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/realpath.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_REALPATH_H
 #define _BSD_REALPATH_H
 
-#include "config.h"
-
 #if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
 
 char *realpath(const char *path, char *resolved);
Index: openbsd-compat/rresvport.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/rresvport.h,v
retrieving revision 1.2
diff -u -r1.2 rresvport.h
--- openbsd-compat/rresvport.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/rresvport.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_RRESVPORT_H
 #define _BSD_RRESVPORT_H
 
-#include "config.h"
-
 #ifndef HAVE_RRESVPORT_AF
 int rresvport_af(int *alport, sa_family_t af);
 #endif /* !HAVE_RRESVPORT_AF */
Index: openbsd-compat/setenv.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/setenv.h,v
retrieving revision 1.2
diff -u -r1.2 setenv.h
--- openbsd-compat/setenv.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/setenv.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_SETENV_H
 #define _BSD_SETENV_H
 
-#include "config.h"
-
 #ifndef HAVE_SETENV
 
 int setenv(register const char *name, register const char *value, int rewrite);
Index: openbsd-compat/setproctitle.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/setproctitle.h,v
retrieving revision 1.2
diff -u -r1.2 setproctitle.h
--- openbsd-compat/setproctitle.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/setproctitle.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_SETPROCTITLE_H
 #define _BSD_SETPROCTITLE_H
 
-#include "config.h"
-
 #ifndef HAVE_SETPROCTITLE
 void setproctitle(const char *fmt, ...);
 #endif
Index: openbsd-compat/strlcat.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/strlcat.h,v
retrieving revision 1.2
diff -u -r1.2 strlcat.h
--- openbsd-compat/strlcat.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/strlcat.h	2001/02/16 22:54:03
@@ -3,7 +3,6 @@
 #ifndef _BSD_STRLCAT_H
 #define _BSD_STRLCAT_H
 
-#include "config.h"
 #ifndef HAVE_STRLCAT
 #include <sys/types.h>
 size_t strlcat(char *dst, const char *src, size_t siz);
Index: openbsd-compat/strlcpy.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/strlcpy.h,v
retrieving revision 1.2
diff -u -r1.2 strlcpy.h
--- openbsd-compat/strlcpy.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/strlcpy.h	2001/02/16 22:54:03
@@ -3,7 +3,6 @@
 #ifndef _BSD_STRLCPY_H
 #define _BSD_STRLCPY_H
 
-#include "config.h"
 #ifndef HAVE_STRLCPY
 #include <sys/types.h>
 size_t strlcpy(char *dst, const char *src, size_t siz);
Index: openbsd-compat/strsep.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/strsep.h,v
retrieving revision 1.2
diff -u -r1.2 strsep.h
--- openbsd-compat/strsep.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/strsep.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_STRSEP_H
 #define _BSD_STRSEP_H
 
-#include "config.h"
-
 #ifndef HAVE_STRSEP
 char *strsep(char **stringp, const char *delim);
 #endif /* HAVE_STRSEP */
Index: openbsd-compat/strtok.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/strtok.h,v
retrieving revision 1.2
diff -u -r1.2 strtok.h
--- openbsd-compat/strtok.h	2001/02/09 01:55:36	1.2
+++ openbsd-compat/strtok.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_STRTOK_H
 #define _BSD_STRTOK_H
 
-#include "config.h"
-
 #ifndef HAVE_STRTOK_R
 char *strtok_r(char *s, const char *delim, char **last);
 #endif /* HAVE_STRTOK_R */
Index: openbsd-compat/vis.h
===================================================================
RCS file: /var/cvs/openssh/openbsd-compat/vis.h,v
retrieving revision 1.2
diff -u -r1.2 vis.h
--- openbsd-compat/vis.h	2001/02/09 01:55:37	1.2
+++ openbsd-compat/vis.h	2001/02/16 22:54:03
@@ -3,8 +3,6 @@
 #ifndef _BSD_VIS_H
 #define	_BSD_VIS_H
 
-#include "config.h"
-
 #ifndef HAVE_VIS
 
 /*


-- 
| Damien Miller <djm at mindrot.org> \ ``E-mail attachments are the poor man's 
| http://www.mindrot.org          /   distributed filesystem'' - Dan Geer






More information about the openssh-unix-dev mailing list