]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Convert coreutils' rand*.{c,h,m4} into modules.
authorJim Meyering <meyering@redhat.com>
Sat, 1 Sep 2007 07:54:45 +0000 (09:54 +0200)
committerJim Meyering <meyering@redhat.com>
Sun, 7 Oct 2007 17:43:35 +0000 (19:43 +0200)
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.

17 files changed:
ChangeLog
bootstrap.conf
gl/lib/rand-isaac.c [moved from lib/rand-isaac.c with 100% similarity]
gl/lib/rand-isaac.h [moved from lib/rand-isaac.h with 100% similarity]
gl/lib/randint.c [moved from lib/randint.c with 100% similarity]
gl/lib/randint.h [moved from lib/randint.h with 100% similarity]
gl/lib/randperm.c [moved from lib/randperm.c with 100% similarity]
gl/lib/randperm.h [moved from lib/randperm.h with 100% similarity]
gl/lib/randread.c [moved from lib/randread.c with 100% similarity]
gl/lib/randread.h [moved from lib/randread.h with 100% similarity]
gl/modules/randint [new file with mode: 0644]
gl/modules/randperm [new file with mode: 0644]
gl/modules/randread [new file with mode: 0644]
m4/prereq.m4
m4/randint.m4 [deleted file]
m4/randperm.m4 [deleted file]
m4/randread.m4 [deleted file]

index fb2ce1695fa8ab173510aee6505f1ee7b22801ce..cb2e78095cb2a085a8794147a42aeeda9757d060 100644 (file)
--- 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.
index 2088e501220d751ce17f192dcbc156e7e363248d..9584dc06926bff424b3d63fc06504bb6ad133804 100644 (file)
@@ -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
similarity index 100%
rename from lib/rand-isaac.c
rename to gl/lib/rand-isaac.c
similarity index 100%
rename from lib/rand-isaac.h
rename to gl/lib/rand-isaac.h
similarity index 100%
rename from lib/randint.c
rename to gl/lib/randint.c
similarity index 100%
rename from lib/randint.h
rename to gl/lib/randint.h
similarity index 100%
rename from lib/randperm.c
rename to gl/lib/randperm.c
similarity index 100%
rename from lib/randperm.h
rename to gl/lib/randperm.h
similarity index 100%
rename from lib/randread.c
rename to gl/lib/randread.c
similarity index 100%
rename from lib/randread.h
rename to gl/lib/randread.h
diff --git a/gl/modules/randint b/gl/modules/randint
new file mode 100644 (file)
index 0000000..4485581
--- /dev/null
@@ -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 (file)
index 0000000..9cef782
--- /dev/null
@@ -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 (file)
index 0000000..fb40007
--- /dev/null
@@ -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
index c5a2d45cb4dd01358affae0e9af8ab9f5df7f50d..ea9b5bd56386451f0167a288c8402ce4a6d7956a 100644 (file)
@@ -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 (file)
index 50209ed..0000000
+++ /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 (file)
index de2d691..0000000
+++ /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 (file)
index c30ddd3..0000000
+++ /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])
-])