1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

30 Commits

Author SHA1 Message Date
Andreas Schneider
94e21c139f replace: Use the same size as d_name member of struct dirent
This fixes an error with GCC 7.1

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2017-06-01 19:35:10 +02:00
Lukas Slebodnik
b7ae41e6ca lib replace: Fix detection of features
If configure script is executed with stricter cflags
"-Werrorr=implicit-function-declaration -Werror=implicit-int"
then detection of few features will fail.

 Checking for C99 vsnprintf : not found
 Checking for HAVE_SHARED_MMAP : not found
 Checking for HAVE_MREMAP : not found

lib/replace/test/shared_mmap.c:18:1:
    error: return type defaults to ‘int’ [-Werror=implicit-int]
 main()
 ^~~~
lib/replace/test/shared_mmap.c: In function ‘main’:
lib/replace/test/shared_mmap.c:25:16:
    error: implicit declaration of function ‘exit’
    [-Werror=implicit-function-declaration]
  if (fd == -1) exit(1);
                ^~~~
lib/replace/test/shared_mmap.c:25:16:
    warning: incompatible implicit declaration of built-in function ‘exit’
lib/replace/test/shared_mmap.c:25:16:
    note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2017-01-02 14:12:27 +01:00
Volker Lendecke
46916b24e9 lib: Add a little closefrom() test
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jun 13 14:11:11 CEST 2016 on sn-devel-144
2016-06-13 14:11:11 +02:00
Volker Lendecke
19b28ee828 lib: Fix CID 1034836 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-05-06 15:37:14 +02:00
Volker Lendecke
a8c1ad55b5 lib: Fix CID 1034840 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10 21:48:04 +01:00
Volker Lendecke
289c097002 lib: Fix CID 1034839 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10 21:48:04 +01:00
Volker Lendecke
bd470af1df lib: Fix CID 1034838 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10 21:48:04 +01:00
Volker Lendecke
1f9f4006ac libreplace: Fix CID 1034926 Destination buffer too small
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2015-03-10 21:48:04 +01:00
Martin Schwenke
47e7440be9 replace: Remove unused item returned by FAILED()
The (return) value of FAILED() is a constant 1.  However, it is never
used, so the compiler complains when run with -Wall:

  lib/replace/test/os2_delete.c: In function ‘cleanup’:
  lib/replace/test/os2_delete.c:39:163: warning: right-hand operand of comma expression has no effect [-Wunused-value]
   FAILED("system");

So just get remove the ", 1" since it is the bit that does nothing and
is never used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>

Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Aug 20 16:54:31 CEST 2014 on sn-devel-104
2014-08-20 16:54:31 +02:00
David Disseldorp
8a6743e4ed Bug 8997: change libreplace GPL source to LGPL
libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL->LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam <obnox@samba.org> 2008

Signed-off-by: David Disseldorp <ddiss@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Jun  3 18:06:18 CEST 2013 on sn-devel-104
2013-06-03 18:06:18 +02:00
Andreas Schneider
5323508773 replace: Remove deprecated getpass() support.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-03 14:35:10 +01:00
Andrew Bartlett
502135df9f lib/replace: Try to fix build on HP-UX for os2_delete test
The issue is that this file is both used in an autoconf test, and
later in a smbtorture test.  Because os2_delete.c does not include
replace.h, bool may not be defined.

So, instead we shift the need for bool to a different header.

(The readdir tests in repdir.m4 are not yet in the waf configure).

Andrew Bartlett
2012-09-23 14:31:01 +10:00
Rusty Russell
584b996a1a lib/replace: test for incoherent mmap.
We test for other mmap features here, and both tdb1 and tdb2 want this check.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-03-22 01:57:37 +01:00
Simo Sorce
a171938408 replace: Check if we have mremap() available 2011-08-14 19:51:45 -04:00
Jelmer Vernooij
a8eea9e946 lib/replace/test: Add missing include for prototype.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 19 16:45:56 CET 2011 on sn-devel-104
2011-03-19 16:45:56 +01:00
Jelmer Vernooij
f70a658b82 libreplace: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Matthias Dieter Wallnöfer
da78e24ca2 lib/replace/testsuite.c - fix test output 2010-12-23 12:42:37 +01:00
Stefan Metzmacher
96601cab1c lib/replace: use snprintf() in test code to avoid warnings in the IBM-Checker
metze
2010-10-23 08:49:29 +02:00
Günther Deschner
fc9644a7d6 lib/replace: fix some c++ build warnings in testsuite.
Guenther
2010-06-01 16:49:24 +02:00
Andrew Tridgell
fe3cd6fb28 s4-waf: test/simple.c is not needed any more 2010-04-06 20:27:09 +10:00
Andrew Tridgell
2239a52fec build: check if a simple C program runs
This will be helpful for working out why AIX is failing
2010-04-06 20:26:59 +10:00
Andrew Tridgell
d40b396ad8 build: added interface checking and nicer snprintf checking
use CHECK_CODE()
2010-04-06 20:26:43 +10:00
Andrew Tridgell
08e0d94fae replace: allow memmem() with an empty string to return NULL
This is how FreeBSD behaves. We don't rely on it returning the string
in Samba.
2010-03-30 20:34:17 +11:00
Matt Kraai
a2c95a5d96 Change uint_t to unsigned int in lib/replace
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:16 +01:00
Andrew Tridgell
fef3c910da libreplace: some systems don't have memmem()
added rep_memmem() and a testsuite
2010-01-02 10:08:12 +11:00
Jelmer Vernooij
e5233ccf9e Cope with the fact that only _mkdir() exists on Windows and that it
doesn't take a mode argument.
2009-04-20 16:25:16 +02:00
Jeremy Allison
2234173220 Fix warnings in make test code.
Jeremy.
2009-01-02 11:38:24 -08:00
Stefan Metzmacher
05525071e0 libreplace: move main() out of testsuite.c
metze
2008-09-22 00:09:12 +02:00
Simo Sorce
49b89633f1 Fix standalone builds adjusting to new relative path.
Add shared-build target to libreplace.
Useful to build multiple standalone libraries that depend on each other
without having to install them to the final install dir during the build.
2008-09-19 18:06:46 -04:00
Jelmer Vernooij
94855cd692 Move common libraries from root to lib/. 2008-09-17 14:11:12 +02:00