[SCM] Samba Shared Repository - branch master updated

Andreas Schneider asn at samba.org
Fri Nov 30 10:42:03 UTC 2018


The branch, master has been updated
       via  b3490049574 replace: Correctly check for 'extern char **environ' in unistd.h
       via  d8b3280780c util: Fix include file order
      from  f03392a0aef Converted README to markdown

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b3490049574d2e9651a402d6335fa23cefb182c5
Author: Andreas Schneider <asn at samba.org>
Date:   Thu Nov 29 08:12:06 2018 +0100

    replace: Correctly check for 'extern char **environ' in unistd.h
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
    Autobuild-Date(master): Fri Nov 30 11:41:44 CET 2018 on sn-devel-144

commit d8b3280780cf9b4b67b31839cc4f34b5539194dd
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Nov 30 16:58:47 2018 +1100

    util: Fix include file order
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Andreas Schneider <asn at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/replace.h | 20 +++++++++++---------
 lib/replace/wscript   |  3 ++-
 lib/util/strv_util.c  |  3 ++-
 3 files changed, 15 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index ece71b74107..0055255a9a5 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -162,6 +162,10 @@
 #include <bsd/unistd.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
@@ -272,16 +276,14 @@ char *rep_strndup(const char *s, size_t n);
 size_t rep_strnlen(const char *s, size_t n);
 #endif
 
-#if defined(HAVE_DECL_ENVIRON)
-#if !HAVE_DECL_ENVIRON
-#ifdef __APPLE__
-#include <crt_externs.h>
-#define environ (*_NSGetEnviron())
-#else
+#if !defined(HAVE_DECL_ENVIRON)
+# ifdef __APPLE__
+#   include <crt_externs.h>
+#   define environ (*_NSGetEnviron())
+# else /* __APPLE__ */
 extern char **environ;
-#endif
-#endif
-#endif /* defined(HAVE_DECL_ENVIRON) */
+# endif /* __APPLE */
+#endif /* !defined(HAVE_DECL_ENVIRON) */
 
 #ifndef HAVE_SETENV
 #define setenv rep_setenv
diff --git a/lib/replace/wscript b/lib/replace/wscript
index ff918146ffa..173d7e6d29a 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -613,7 +613,8 @@ def configure(conf):
 
     conf.CHECK_DECLS('errno', headers='errno.h', reverse=True)
     conf.CHECK_DECLS('EWOULDBLOCK', headers='errno.h')
-    conf.CHECK_DECLS('environ getgrent_r getpwent_r', reverse=True, headers='pwd.h grp.h')
+    conf.CHECK_DECLS('environ', reverse=True, headers='unistd.h')
+    conf.CHECK_DECLS('getgrent_r getpwent_r', reverse=True, headers='pwd.h grp.h')
     conf.CHECK_DECLS('pread pwrite setenv setresgid setresuid', reverse=True)
 
     if conf.CONFIG_SET('HAVE_EPOLL_CREATE') and conf.CONFIG_SET('HAVE_SYS_EPOLL_H'):
diff --git a/lib/util/strv_util.c b/lib/util/strv_util.c
index 5c914e5620b..9da3eb2ba27 100644
--- a/lib/util/strv_util.c
+++ b/lib/util/strv_util.c
@@ -17,10 +17,11 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "replace.h"
+
 #include <string.h>
 #include <talloc.h>
 
-#include "replace.h"
 #include "strv.h"
 
 #include "strv_util.h"


-- 
Samba Shared Repository



More information about the samba-cvs mailing list