summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog19
-rw-r--r--bootstrap.conf5
-rw-r--r--gl/lib/rand-isaac.c (renamed from lib/rand-isaac.c)0
-rw-r--r--gl/lib/rand-isaac.h (renamed from lib/rand-isaac.h)0
-rw-r--r--gl/lib/randint.c (renamed from lib/randint.c)0
-rw-r--r--gl/lib/randint.h (renamed from lib/randint.h)0
-rw-r--r--gl/lib/randperm.c (renamed from lib/randperm.c)0
-rw-r--r--gl/lib/randperm.h (renamed from lib/randperm.h)0
-rw-r--r--gl/lib/randread.c (renamed from lib/randread.c)0
-rw-r--r--gl/lib/randread.h (renamed from lib/randread.h)0
-rw-r--r--gl/modules/randint24
-rw-r--r--gl/modules/randperm24
-rw-r--r--gl/modules/randread34
-rw-r--r--m4/prereq.m49
-rw-r--r--m4/randint.m412
-rw-r--r--m4/randperm.m410
-rw-r--r--m4/randread.m411
17 files changed, 107 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index fb2ce1695..cb2e78095 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,24 @@
2007-10-07 Jim Meyering <meyering@redhat.com>
+ Convert coreutils' rand*.{c,h,m4} into modules.
+ First step: move these files to gl/lib:
+ * lib/rand-isaac.c, lib/rand-isaac.h
+ * lib/randint.c, lib/randint.h
+ * lib/randperm.c, lib/randperm.h
+ * lib/randread.c, lib/randread.h
+ Step 2: add modules/rand* and remove now-unneeded .m4 files.
+ * gl/modules/randint: New file.
+ * gl/modules/randperm: New file.
+ * gl/modules/randread: New file.
+ * m4/randint.m4: Remove file.
+ * m4/randperm.m4: Remove file.
+ * m4/randread.m4: Remove file.
+ Step 3: use the new modules
+ * bootstrap.conf (gnulib_modules): Add randint and randperm.
+ * m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require;
+ These have been removed.
+ (gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
+
Copy from gnulib the parts of tempname that we'll modify.
* gl/lib/tempname.c: Copy from gnulib.
* gl/lib/tempname.h: Likewise.
diff --git a/bootstrap.conf b/bootstrap.conf
index 2088e5012..9584dc069 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -61,7 +61,10 @@ gnulib_modules="
memrchr mgetgroups
mkancesdirs mkdir mkdir-p mkstemp mktime modechange
mountlist mpsort obstack pathmax perl physmem posixtm posixver putenv
- quote quotearg raise readlink areadlink-with-size readtokens
+ quote quotearg raise readlink areadlink-with-size
+ randint
+ randperm
+ readtokens
readtokens0 readutmp
realloc regex rename-dest-slash rmdir rmdir-errno
root-dev-ino
diff --git a/lib/rand-isaac.c b/gl/lib/rand-isaac.c
index cd69fbfde..cd69fbfde 100644
--- a/lib/rand-isaac.c
+++ b/gl/lib/rand-isaac.c
diff --git a/lib/rand-isaac.h b/gl/lib/rand-isaac.h
index 94ca74f53..94ca74f53 100644
--- a/lib/rand-isaac.h
+++ b/gl/lib/rand-isaac.h
diff --git a/lib/randint.c b/gl/lib/randint.c
index 53e8c3269..53e8c3269 100644
--- a/lib/randint.c
+++ b/gl/lib/randint.c
diff --git a/lib/randint.h b/gl/lib/randint.h
index 1e96ccb50..1e96ccb50 100644
--- a/lib/randint.h
+++ b/gl/lib/randint.h
diff --git a/lib/randperm.c b/gl/lib/randperm.c
index 0aaa5e2ff..0aaa5e2ff 100644
--- a/lib/randperm.c
+++ b/gl/lib/randperm.c
diff --git a/lib/randperm.h b/gl/lib/randperm.h
index 79bbf9fe6..79bbf9fe6 100644
--- a/lib/randperm.h
+++ b/gl/lib/randperm.h
diff --git a/lib/randread.c b/gl/lib/randread.c
index 9f65db676..9f65db676 100644
--- a/lib/randread.c
+++ b/gl/lib/randread.c
diff --git a/lib/randread.h b/gl/lib/randread.h
index 5f044bd30..5f044bd30 100644
--- a/lib/randread.h
+++ b/gl/lib/randread.h
diff --git a/gl/modules/randint b/gl/modules/randint
new file mode 100644
index 000000000..4485581ae
--- /dev/null
+++ b/gl/modules/randint
@@ -0,0 +1,24 @@
+Description:
+Generate random integers.
+
+Files:
+lib/randint.c
+lib/randint.h
+
+Depends-on:
+inline
+randread
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += randint.c randint.h
+
+Include:
+"randint.h"
+
+License
+GPL
+
+Maintainer:
+Paul Eggert
diff --git a/gl/modules/randperm b/gl/modules/randperm
new file mode 100644
index 000000000..9cef78271
--- /dev/null
+++ b/gl/modules/randperm
@@ -0,0 +1,24 @@
+Description:
+Generate random permutations.
+
+Files:
+lib/randperm.c
+lib/randperm.h
+
+Depends-on:
+randint
+xalloc
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += randperm.c randperm.h
+
+Include:
+"randperm.h"
+
+License
+GPL
+
+Maintainer:
+Paul Eggert
diff --git a/gl/modules/randread b/gl/modules/randread
new file mode 100644
index 000000000..fb40007aa
--- /dev/null
+++ b/gl/modules/randread
@@ -0,0 +1,34 @@
+Description:
+Generate buffers of random data.
+
+Files:
+lib/rand-isaac.c
+lib/rand-isaac.h
+lib/randread.c
+lib/randread.h
+
+Depends-on:
+error
+exitfail
+fopen-safer
+gethrxtime
+quotearg
+rand-isaac
+stdbool
+stdint
+unlocked-io
+xalloc
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += randread.c randread.h rand-isaac.c rand-isaac.h
+
+Include:
+"randread.h"
+
+License
+GPL
+
+Maintainer:
+Paul Eggert
diff --git a/m4/prereq.m4 b/m4/prereq.m4
index c5a2d45cb..ea9b5bd56 100644
--- a/m4/prereq.m4
+++ b/m4/prereq.m4
@@ -1,4 +1,4 @@
-#serial 73
+#serial 74
dnl We use gl_ for non Autoconf macros.
m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
@@ -7,8 +7,7 @@ m4_pattern_forbid([^gl_[ABCDEFGHIJKLMNOPQRSTUVXYZ]])dnl
# directory of the coreutils package.
-# Copyright (C) 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2003-2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -41,10 +40,6 @@ AC_DEFUN([gl_PREREQ],
AC_REQUIRE([gl_FD_REOPEN])
AC_REQUIRE([gl_FUNC_XFTS])
AC_REQUIRE([gl_MEMXFRM])
- AC_REQUIRE([gl_RANDINT])
- AC_REQUIRE([gl_RANDPERM])
- AC_REQUIRE([gl_RANDREAD])
- AC_REQUIRE([gl_ROOT_DEV_INO])
AC_REQUIRE([gl_SHA256])
AC_REQUIRE([gl_SHA512])
AC_REQUIRE([gl_STRINTCMP])
diff --git a/m4/randint.m4 b/m4/randint.m4
deleted file mode 100644
index 50209ed2a..000000000
--- a/m4/randint.m4
+++ /dev/null
@@ -1,12 +0,0 @@
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_RANDINT],
-[
- AC_LIBSOURCES([randint.c, randint.h])
- AC_LIBOBJ([randint])
-
- AC_REQUIRE([AC_C_INLINE])
-])
diff --git a/m4/randperm.m4 b/m4/randperm.m4
deleted file mode 100644
index de2d691db..000000000
--- a/m4/randperm.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_RANDPERM],
-[
- AC_LIBSOURCES([randperm.c, randperm.h])
- AC_LIBOBJ([randperm])
-])
diff --git a/m4/randread.m4 b/m4/randread.m4
deleted file mode 100644
index c30ddd3f2..000000000
--- a/m4/randread.m4
+++ /dev/null
@@ -1,11 +0,0 @@
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_RANDREAD],
-[
- AC_LIBSOURCES([randread.c, randread.h, rand-isaac.c, rand-isaac.h])
- AC_LIBOBJ([randread])
- AC_LIBOBJ([rand-isaac])
-])