1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 02:10:57 +02:00

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.
This commit is contained in:
Jim Meyering
2007-09-01 09:54:45 +02:00
parent 696f4a8042
commit 58a7ead41d
17 changed files with 107 additions and 41 deletions

View File

@@ -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.

View 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

24
gl/modules/randint Normal file
View File

@@ -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

24
gl/modules/randperm Normal file
View File

@@ -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

34
gl/modules/randread Normal file
View File

@@ -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

View 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])

View File

@@ -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])
])

View File

@@ -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])
])

View File

@@ -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])
])