Bugzilla – Attachment 2708 Details for
Bug 2463
Conflict with openbsd compat glob() function in shared libraries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
shrink diff further by using #defines in openbsd-compat/glob.c
openssh-glob.patch (text/plain), 2.49 KB, created by
Darren Tucker
on 2015-09-17 11:43:16 AEST
(
hide
)
Description:
shrink diff further by using #defines in openbsd-compat/glob.c
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2015-09-17 11:43:16 AEST
Size:
2.49 KB
patch
obsolete
>diff --git a/defines.h b/defines.h >index fa0ccba..a438ddd 100644 >--- a/defines.h >+++ b/defines.h >@@ -850,4 +850,11 @@ struct winsize { > # endif /* gcc version */ > #endif /* __predict_true */ > >+#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ >+ defined(GLOB_HAS_GL_MATCHC) && defined(GLOB_HAS_GL_STATV) && \ >+ defined(HAVE_DECL_GLOB_NOMATCH) && HAVE_DECL_GLOB_NOMATCH != 0 && \ >+ !defined(BROKEN_GLOB) >+# define USE_SYSTEM_GLOB >+#endif >+ > #endif /* _DEFINES_H */ >diff --git a/includes.h b/includes.h >index 2893a54..497a038 100644 >--- a/includes.h >+++ b/includes.h >@@ -32,12 +32,6 @@ > #ifdef HAVE_BSTRING_H > # include <bstring.h> > #endif >-#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \ >- defined(GLOB_HAS_GL_MATCHC) && defined(GLOB_HAS_GL_STATV) && \ >- defined(HAVE_DECL_GLOB_NOMATCH) && HAVE_DECL_GLOB_NOMATCH != 0 && \ >- !defined(BROKEN_GLOB) >-# include <glob.h> >-#endif > #ifdef HAVE_ENDIAN_H > # include <endian.h> > #endif >diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c >index 742b4b9..7c97e67 100644 >--- a/openbsd-compat/glob.c >+++ b/openbsd-compat/glob.c >@@ -59,6 +59,7 @@ > */ > > #include "includes.h" >+#include "glob.h" > > #include <sys/types.h> > #include <sys/stat.h> >diff --git a/openbsd-compat/glob.h b/openbsd-compat/glob.h >index f8a7fa5..9551861 100644 >--- a/openbsd-compat/glob.h >+++ b/openbsd-compat/glob.h >@@ -42,11 +42,15 @@ > !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 || \ > defined(BROKEN_GLOB) > >-#ifndef _GLOB_H_ >-#define _GLOB_H_ >+#ifndef _COMPAT_GLOB_H_ >+#define _COMPAT_GLOB_H_ > > #include <sys/stat.h> > >+# define glob_t compat_glob_t >+# define glob(a, b, c, d) _compat_glob(a, b, c, d) >+# define globfree(a) _compat_globfree(a) >+ > struct stat; > typedef struct { > int gl_pathc; /* Count of total paths so far. */ >diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h >index 1ff7114..8cc8a11 100644 >--- a/openbsd-compat/openbsd-compat.h >+++ b/openbsd-compat/openbsd-compat.h >@@ -39,7 +39,6 @@ > /* OpenBSD function replacements */ > #include "base64.h" > #include "sigact.h" >-#include "glob.h" > #include "readpassphrase.h" > #include "vis.h" > #include "getrrsetbyname.h" >diff --git a/sftp-client.h b/sftp-client.h >index f814b07..14a3b81 100644 >--- a/sftp-client.h >+++ b/sftp-client.h >@@ -21,6 +21,12 @@ > #ifndef _SFTP_CLIENT_H > #define _SFTP_CLIENT_H > >+#ifdef USE_SYSTEM_GLOB >+# include <glob.h> >+#else >+# include "openbsd-compat/glob.h" >+#endif >+ > typedef struct SFTP_DIRENT SFTP_DIRENT; > > struct SFTP_DIRENT {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2463
:
2701
|
2704
|
2707
|
2708
|
2709