Changeset 860 for vendor/current/lib/replace
- Timestamp:
- May 12, 2014, 8:58:38 PM (11 years ago)
- Location:
- vendor/current/lib/replace
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/replace/getifaddrs.c
r740 r860 5 5 Copyright (C) Jeremy Allison 2007 6 6 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, 14 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNUGeneral Public License for more details.17 18 You should have received a copy of the GNU General Public License19 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/>. 20 24 */ 21 25 -
vendor/current/lib/replace/libreplace.m4
r740 r860 67 67 68 68 AC_CHECK_HEADERS(stdbool.h stdint.h sys/select.h) 69 AC_CHECK_HEADERS(setjmp.h utime.h )69 AC_CHECK_HEADERS(setjmp.h utime.h sys/wait.h) 70 70 71 71 LIBREPLACE_PROVIDE_HEADER([stdint.h]) … … 106 106 AC_CHECK_HEADERS(stropts.h) 107 107 AC_CHECK_HEADERS(unix.h) 108 AC_CHECK_HEADERS(sys/ucontext.h) 108 109 109 110 AC_CHECK_FUNCS(seteuid setresuid setegid setresgid chroot bzero strerror strerror_r) … … 267 268 268 269 270 dnl Check if the C compiler understands volatile (it should, being ANSI). 271 AC_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)]) 274 if test x"$libreplace_cv_volatile" = x"yes"; then 275 AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile]) 276 fi 277 278 m4_include(system/config.m4) 279 269 280 AC_CACHE_CHECK([for O_DIRECT flag to open(2)],libreplace_cv_HAVE_OPEN_O_DIRECT,[ 270 281 AC_TRY_COMPILE([ … … 278 289 AC_DEFINE(HAVE_OPEN_O_DIRECT,1,[Whether the open(2) accepts O_DIRECT]) 279 290 fi 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"; then287 AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])288 fi289 290 m4_include(system/config.m4)291 291 292 292 m4_include(dlfcn.m4) … … 325 325 if test x"$libreplace_cv_struct_timespec" = x"yes"; then 326 326 AC_DEFINE(HAVE_STRUCT_TIMESPEC,1,[Whether we have struct timespec]) 327 fi 328 329 AC_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)]) 337 if test x"$libreplace_cv_ucontext_t" = x"yes"; then 338 AC_DEFINE(HAVE_UCONTEXT_T,1,[Whether we have ucontext_t]) 327 339 fi 328 340 -
vendor/current/lib/replace/libreplace_macros.m4
r740 r860 299 299 ]) 300 300 ) 301 AS_IF([ test $AS_TR_SH([ac_cv_c_prototype_$1]) = yes],[$3],[$4])301 AS_IF([eval test $AS_TR_SH([ac_cv_c_prototype_$1]) = yes],[$3],[$4]) 302 302 ]) 303 303 -
vendor/current/lib/replace/replace.c
r740 r860 751 751 #endif 752 752 753 #if ndef HAVE_VDPRINTF753 #if !defined(HAVE_VDPRINTF) || !defined(HAVE_C99_VSNPRINTF) 754 754 int rep_vdprintf(int fd, const char *format, va_list ap) 755 755 { … … 768 768 #endif 769 769 770 #if ndef HAVE_DPRINTF770 #if !defined(HAVE_DPRINTF) || !defined(HAVE_C99_VSNPRINTF) 771 771 int rep_dprintf(int fd, const char *format, ...) 772 772 { -
vendor/current/lib/replace/replace.h
r746 r860 356 356 #endif 357 357 358 #ifndef HAVE_VDPRINTF359 #define vdprintf rep_vdprintf360 int rep_vdprintf(int fd, const char *format, va_list ap);361 #endif362 363 #ifndef HAVE_DPRINTF364 #define dprintf rep_dprintf365 int rep_dprintf(int fd, const char *format, ...);366 #endif367 368 358 #ifndef PRINTF_ATTRIBUTE 369 359 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) … … 386 376 #endif 387 377 388 #ifndef HAVE_VASPRINTF 378 #if !defined(HAVE_VDPRINTF) || !defined(HAVE_C99_VSNPRINTF) 379 #define vdprintf rep_vdprintf 380 int 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 385 int rep_dprintf(int fd, const char *format, ...) PRINTF_ATTRIBUTE(2,3); 386 #endif 387 388 #if !defined(HAVE_VASPRINTF) || !defined(HAVE_C99_VSNPRINTF) 389 389 #define vasprintf rep_vasprintf 390 390 int rep_vasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); … … 401 401 #endif 402 402 403 #if ndef HAVE_ASPRINTF403 #if !defined(HAVE_ASPRINTF) || !defined(HAVE_C99_VSNPRINTF) 404 404 #define asprintf rep_asprintf 405 405 int 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 418 int rep_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2); 419 #endif 420 421 #if !defined(HAVE_C99_VSNPRINTF) 422 #define fprintf rep_fprintf 423 int rep_fprintf(FILE *stream, const char *, ...) PRINTF_ATTRIBUTE(2,3); 406 424 #endif 407 425 -
vendor/current/lib/replace/snprintf.c
r414 r860 1188 1188 } 1189 1189 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) 1191 1191 { 1192 1192 return dopr(str, count, fmt, args); … … 1201 1201 */ 1202 1202 #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,...) 1204 1204 { 1205 1205 size_t ret; … … 1214 1214 1215 1215 #ifndef HAVE_C99_VSNPRINTF 1216 int printf(const char *fmt, ...)1216 int rep_printf(const char *fmt, ...) 1217 1217 { 1218 1218 va_list ap; … … 1235 1235 1236 1236 #ifndef HAVE_C99_VSNPRINTF 1237 int fprintf(FILE *stream, const char *fmt, ...)1237 int rep_fprintf(FILE *stream, const char *fmt, ...) 1238 1238 { 1239 1239 va_list ap; … … 1257 1257 #endif 1258 1258 1259 #if ndef HAVE_VASPRINTF1260 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) 1261 1261 { 1262 1262 int ret; … … 1279 1279 #endif 1280 1280 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, ...) 1284 1283 { 1285 1284 va_list ap; -
vendor/current/lib/replace/socket.c
r414 r860 6 6 * Copyright (C) Michael Adam <obnox@samba.org> 2008 7 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. 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 12 11 * 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, 14 18 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNUGeneral Public License for more details.19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 * Library General Public License for more details. 17 21 * 18 * You should have received a copy of the GNU General Public License19 * 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/>. 20 24 */ 21 25 -
vendor/current/lib/replace/system/wait.h
r740 r860 41 41 #endif 42 42 43 #ifdef HAVE_SYS_UCONTEXT_H 44 #include <sys/ucontext.h> 45 #endif 46 43 47 #if !defined(HAVE_SIG_ATOMIC_T_TYPE) 44 48 typedef int sig_atomic_t; -
vendor/current/lib/replace/test/getifaddrs.c
r414 r860 6 6 * Copyright (C) Michael Adam <obnox@samba.org> 2008 7 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. 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 12 11 * 13 * This program is distributed in the hope that it will be useful,14 * but WITHOUT ANY WARRANTY; without even the implied warranty of15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16 * 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. 17 16 * 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/>. 20 24 */ 21 25
Note:
See TracChangeset
for help on using the changeset viewer.