From 53f005f6aaa2aa2eb599e6787e2c700a1d44d2a2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 13 May 2006 18:12:53 +0000 Subject: r15572: Trim build/m4/rewrite.m4 a bit more, remove unused tests. (This used to be commit d72c5c8f755277eb22e1f6834d98202f00c09934) --- source4/build/tests/ftruncate.c | 27 ----------------- source4/build/tests/getgroups.c | 66 ----------------------------------------- 2 files changed, 93 deletions(-) delete mode 100644 source4/build/tests/ftruncate.c delete mode 100644 source4/build/tests/getgroups.c (limited to 'source4/build/tests') diff --git a/source4/build/tests/ftruncate.c b/source4/build/tests/ftruncate.c deleted file mode 100644 index e71b29fd83..0000000000 --- a/source4/build/tests/ftruncate.c +++ /dev/null @@ -1,27 +0,0 @@ -/* test whether ftruncate() can extend a file */ - -#if defined(HAVE_UNISTD_H) -#include -#endif - -#include -#include -#include - -#define DATA "conftest.trunc" -#define LEN 7663 - -main() -{ - int *buf; - int fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666); - - ftruncate(fd, LEN); - - unlink(DATA); - - if (lseek(fd, 0, SEEK_END) == LEN) { - exit(0); - } - exit(1); -} diff --git a/source4/build/tests/getgroups.c b/source4/build/tests/getgroups.c deleted file mode 100644 index 343fd5a184..0000000000 --- a/source4/build/tests/getgroups.c +++ /dev/null @@ -1,66 +0,0 @@ -/* this tests whether getgroups actually returns lists of integers - rather than gid_t. The test only works if the user running - the test is in at least 1 group - - The test is designed to check for those broken OSes that define - getgroups() as returning an array of gid_t but actually return a - array of ints! Ultrix is one culprit - */ - -#if defined(HAVE_UNISTD_H) -#include -#endif - -#include -#include -#include -#include - -main() -{ - int i; - int *igroups; - char *cgroups; - int grp = 0; - int ngroups = getgroups(0,&grp); - - if (sizeof(gid_t) == sizeof(int)) { - fprintf(stderr,"gid_t and int are the same size\n"); - exit(1); - } - - if (ngroups <= 0) - ngroups = 32; - - igroups = (int *)malloc(sizeof(int)*ngroups); - - for (i=0;i