Ignore:
Timestamp:
May 12, 2014, 8:58:38 PM (11 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.6: updated vendor to latest version

Location:
vendor/current/lib/replace
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/replace/getifaddrs.c

    r740 r860  
    55   Copyright (C) Jeremy Allison 2007
    66   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
    7    
    8    This program is free software; you can redistribute it and/or modify
    9    it under the terms of the GNU General Public License as published by
    10    the Free Software Foundation; either version 3 of the License, or
    11    (at your option) any later version.
    12    
    13    This program is distributed in the hope that it will be useful,
     7
     8     ** NOTE! The following LGPL license applies to the replace
     9     ** library. This does NOT imply that all of Samba is released
     10     ** under the LGPL
     11
     12   This library is free software; you can redistribute it and/or
     13   modify it under the terms of the GNU Lesser General Public
     14   License as published by the Free Software Foundation; either
     15   version 3 of the License, or (at your option) any later version.
     16
     17   This library is distributed in the hope that it will be useful,
    1418   but WITHOUT ANY WARRANTY; without even the implied warranty of
    15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16    GNU General Public License for more details.
    17    
    18    You should have received a copy of the GNU General Public License
    19    along with this program.  If not, see <http://www.gnu.org/licenses/>.
     19   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20   Library General Public License for more details.
     21
     22   You should have received a copy of the GNU Lesser General Public
     23   License along with this library; if not, see <http://www.gnu.org/licenses/>.
    2024*/
    2125
  • vendor/current/lib/replace/libreplace.m4

    r740 r860  
    6767
    6868AC_CHECK_HEADERS(stdbool.h stdint.h sys/select.h)
    69 AC_CHECK_HEADERS(setjmp.h utime.h)
     69AC_CHECK_HEADERS(setjmp.h utime.h sys/wait.h)
    7070
    7171LIBREPLACE_PROVIDE_HEADER([stdint.h])
     
    106106AC_CHECK_HEADERS(stropts.h)
    107107AC_CHECK_HEADERS(unix.h)
     108AC_CHECK_HEADERS(sys/ucontext.h)
    108109
    109110AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror strerror_r)
     
    267268
    268269
     270dnl Check if the C compiler understands volatile (it should, being ANSI).
     271AC_CACHE_CHECK([that the C compiler understands volatile],libreplace_cv_volatile, [
     272        AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],
     273                libreplace_cv_volatile=yes,libreplace_cv_volatile=no)])
     274if test x"$libreplace_cv_volatile" = x"yes"; then
     275        AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])
     276fi
     277
     278m4_include(system/config.m4)
     279
    269280AC_CACHE_CHECK([for O_DIRECT flag to open(2)],libreplace_cv_HAVE_OPEN_O_DIRECT,[
    270281AC_TRY_COMPILE([
     
    278289    AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT])
    279290fi
    280 
    281 
    282 dnl Check if the C compiler understands volatile (it should, being ANSI).
    283 AC_CACHE_CHECK([that the C compiler understands volatile],libreplace_cv_volatile, [
    284         AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0],
    285                 libreplace_cv_volatile=yes,libreplace_cv_volatile=no)])
    286 if test x"$libreplace_cv_volatile" = x"yes"; then
    287         AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])
    288 fi
    289 
    290 m4_include(system/config.m4)
    291291
    292292m4_include(dlfcn.m4)
     
    325325if test x"$libreplace_cv_struct_timespec" = x"yes"; then
    326326   AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec])
     327fi
     328
     329AC_CACHE_CHECK([for ucontext_t type],libreplace_cv_ucontext_t, [
     330    AC_TRY_COMPILE([
     331#include <signal.h>
     332#if HAVE_SYS_UCONTEXT_H
     333#include <sys/ucontext.h>
     334# endif
     335],[ucontext_t uc; sigaddset(&uc.uc_sigmask, SIGUSR1);],
     336    libreplace_cv_ucontext_t=yes,libreplace_cv_ucontext_t=no)])
     337if test x"$libreplace_cv_ucontext_t" = x"yes"; then
     338    AC_DEFINE(HAVE_UCONTEXT_T,1,[Whether we have ucontext_t])
    327339fi
    328340
  • vendor/current/lib/replace/libreplace_macros.m4

    r740 r860  
    299299        ])
    300300)
    301 AS_IF([test $AS_TR_SH([ac_cv_c_prototype_$1]) = yes],[$3],[$4])
     301AS_IF([eval test $AS_TR_SH([ac_cv_c_prototype_$1]) = yes],[$3],[$4])
    302302])
    303303
  • vendor/current/lib/replace/replace.c

    r740 r860  
    751751#endif
    752752
    753 #ifndef HAVE_VDPRINTF
     753#if !defined(HAVE_VDPRINTF) || !defined(HAVE_C99_VSNPRINTF)
    754754int rep_vdprintf(int fd, const char *format, va_list ap)
    755755{
     
    768768#endif
    769769
    770 #ifndef HAVE_DPRINTF
     770#if !defined(HAVE_DPRINTF) || !defined(HAVE_C99_VSNPRINTF)
    771771int rep_dprintf(int fd, const char *format, ...)
    772772{
  • vendor/current/lib/replace/replace.h

    r746 r860  
    356356#endif
    357357
    358 #ifndef HAVE_VDPRINTF
    359 #define vdprintf rep_vdprintf
    360 int rep_vdprintf(int fd, const char *format, va_list ap);
    361 #endif
    362 
    363 #ifndef HAVE_DPRINTF
    364 #define dprintf rep_dprintf
    365 int rep_dprintf(int fd, const char *format, ...);
    366 #endif
    367 
    368358#ifndef PRINTF_ATTRIBUTE
    369359#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
     
    386376#endif
    387377
    388 #ifndef HAVE_VASPRINTF
     378#if !defined(HAVE_VDPRINTF) || !defined(HAVE_C99_VSNPRINTF)
     379#define vdprintf rep_vdprintf
     380int rep_vdprintf(int fd, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
     381#endif
     382
     383#if !defined(HAVE_DPRINTF) || !defined(HAVE_C99_VSNPRINTF)
     384#define dprintf rep_dprintf
     385int rep_dprintf(int fd, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
     386#endif
     387
     388#if !defined(HAVE_VASPRINTF) || !defined(HAVE_C99_VSNPRINTF)
    389389#define vasprintf rep_vasprintf
    390390int rep_vasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0);
     
    401401#endif
    402402
    403 #ifndef HAVE_ASPRINTF
     403#if !defined(HAVE_ASPRINTF) || !defined(HAVE_C99_VSNPRINTF)
    404404#define asprintf rep_asprintf
    405405int rep_asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
     406#endif
     407
     408#if !defined(HAVE_C99_VSNPRINTF)
     409#ifdef REPLACE_BROKEN_PRINTF
     410/*
     411 * We do not redefine printf by default
     412 * as it breaks the build if system headers
     413 * use __attribute__((format(printf, 3, 0)))
     414 * instead of __attribute__((format(__printf__, 3, 0)))
     415 */
     416#define printf rep_printf
     417#endif
     418int rep_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2);
     419#endif
     420
     421#if !defined(HAVE_C99_VSNPRINTF)
     422#define fprintf rep_fprintf
     423int rep_fprintf(FILE *stream, const char *, ...) PRINTF_ATTRIBUTE(2,3);
    406424#endif
    407425
  • vendor/current/lib/replace/snprintf.c

    r414 r860  
    11881188}
    11891189
    1190  int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
     1190 int rep_vsnprintf (char *str, size_t count, const char *fmt, va_list args)
    11911191{
    11921192        return dopr(str, count, fmt, args);
     
    12011201 */
    12021202#if !defined(HAVE_SNPRINTF) || !defined(HAVE_C99_VSNPRINTF)
    1203  int snprintf(char *str,size_t count,const char *fmt,...)
     1203 int rep_snprintf(char *str,size_t count,const char *fmt,...)
    12041204{
    12051205        size_t ret;
     
    12141214
    12151215#ifndef HAVE_C99_VSNPRINTF
    1216  int printf(const char *fmt, ...)
     1216 int rep_printf(const char *fmt, ...)
    12171217{
    12181218        va_list ap;
     
    12351235
    12361236#ifndef HAVE_C99_VSNPRINTF
    1237  int fprintf(FILE *stream, const char *fmt, ...)
     1237 int rep_fprintf(FILE *stream, const char *fmt, ...)
    12381238{
    12391239        va_list ap;
     
    12571257#endif
    12581258
    1259 #ifndef HAVE_VASPRINTF
    1260  int vasprintf(char **ptr, const char *format, va_list ap)
     1259#if !defined(HAVE_VASPRINTF) || !defined(HAVE_C99_VSNPRINTF)
     1260 int rep_vasprintf(char **ptr, const char *format, va_list ap)
    12611261{
    12621262        int ret;
     
    12791279#endif
    12801280
    1281 
    1282 #ifndef HAVE_ASPRINTF
    1283  int asprintf(char **ptr, const char *format, ...)
     1281#if !defined(HAVE_ASPRINTF) || !defined(HAVE_C99_VSNPRINTF)
     1282 int rep_asprintf(char **ptr, const char *format, ...)
    12841283{
    12851284        va_list ap;
  • vendor/current/lib/replace/socket.c

    r414 r860  
    66 * Copyright (C) Michael Adam <obnox@samba.org> 2008
    77 *
    8  * This program is free software; you can redistribute it and/or modify
    9  * it under the terms of the GNU General Public License as published by
    10  * the Free Software Foundation; either version 3 of the License, or
    11  * (at your option) any later version.
     8 *   ** NOTE! The following LGPL license applies to the replace
     9 *   ** library. This does NOT imply that all of Samba is released
     10 *   ** under the LGPL
    1211 *
    13  * This program is distributed in the hope that it will be useful,
     12 * This library is free software; you can redistribute it and/or
     13 * modify it under the terms of the GNU Lesser General Public
     14 * License as published by the Free Software Foundation; either
     15 * version 3 of the License, or (at your option) any later version.
     16 *
     17 * This library is distributed in the hope that it will be useful,
    1418 * but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  * GNU General Public License for more details.
     19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20 * Library General Public License for more details.
    1721 *
    18  * You should have received a copy of the GNU General Public License
    19  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     22 * You should have received a copy of the GNU Lesser General Public
     23 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
    2024 */
    2125
  • vendor/current/lib/replace/system/wait.h

    r740 r860  
    4141#endif
    4242
     43#ifdef HAVE_SYS_UCONTEXT_H
     44#include <sys/ucontext.h>
     45#endif
     46
    4347#if !defined(HAVE_SIG_ATOMIC_T_TYPE)
    4448typedef int sig_atomic_t;
  • vendor/current/lib/replace/test/getifaddrs.c

    r414 r860  
    66 * Copyright (C) Michael Adam <obnox@samba.org> 2008
    77 *
    8  *  This program is free software; you can redistribute it and/or modify
    9  *  it under the terms of the GNU General Public License as published by
    10  *  the Free Software Foundation; either version 3 of the License, or
    11  *  (at your option) any later version.
     8 *   ** NOTE! The following LGPL license applies to the replace
     9 *   ** library. This does NOT imply that all of Samba is released
     10 *   ** under the LGPL
    1211 *
    13  *  This program is distributed in the hope that it will be useful,
    14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16  *  GNU General Public License for more details.
     12 * This library is free software; you can redistribute it and/or
     13 * modify it under the terms of the GNU Lesser General Public
     14 * License as published by the Free Software Foundation; either
     15 * version 3 of the License, or (at your option) any later version.
    1716 *
    18  *  You should have received a copy of the GNU General Public License
    19  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 * This library is distributed in the hope that it will be useful,
     18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     20 * Library General Public License for more details.
     21 *
     22 * You should have received a copy of the GNU Lesser General Public
     23 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
    2024 */
    2125
Note: See TracChangeset for help on using the changeset viewer.