From: Simon Josefsson Date: Tue, 7 Mar 2006 13:30:51 +0000 (+0000) Subject: Fix use of unistd.h in getopt through a new unistd module. X-Git-Tag: cvs-readonly~2501 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=266f4849713b596f0dce71069dba18dc2fbb081d;p=gnulib.git Fix use of unistd.h in getopt through a new unistd module. --- diff --git a/ChangeLog b/ChangeLog index 7ace051f2..ecdc2146e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-03-07 Simon Josefsson + * modules/getopt (Depends-on): Add unistd. + + * modules/unistd: New file. + +2006-03-07 Simon Josefsson + * modules/gc-random: New file. 2006-03-03 Simon Josefsson diff --git a/lib/ChangeLog b/lib/ChangeLog index 8e956555d..b5cc5b1ac 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,9 @@ 2006-03-07 Simon Josefsson + * unistd_.h: New file. + +2006-03-07 Simon Josefsson + * gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM. 2006-03-01 Simon Josefsson diff --git a/lib/unistd_.h b/lib/unistd_.h new file mode 100644 index 000000000..484bd36a7 --- /dev/null +++ b/lib/unistd_.h @@ -0,0 +1,24 @@ +/* A unistd.h replacement for systems lacking it. + Copyright (C) 2006 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. */ + +/* Put any statements that are necessary to get a working unistd.h in + this file. */ + +/* MS Visual Studio doesn't have unistd.h, but it doesn't seem to need + any particular statements in this file. So this file is here to + avoid breaking '#include ' in other files. */ diff --git a/m4/ChangeLog b/m4/ChangeLog index 739cd0eb1..7c2365fd6 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,5 +1,9 @@ 2006-03-07 Simon Josefsson + * unistd_h.m4: New file. + +2006-03-07 Simon Josefsson + * readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the test to be side-effect free by storing the result in the cache variable gl_cv_lib_readline, and moving the assignment of diff --git a/modules/getopt b/modules/getopt index 420250c3a..55fc61a60 100644 --- a/modules/getopt +++ b/modules/getopt @@ -10,6 +10,7 @@ m4/getopt.m4 Depends-on: gettext-h +unistd configure.ac: gl_GETOPT diff --git a/modules/unistd b/modules/unistd new file mode 100644 index 000000000..edcae8382 --- /dev/null +++ b/modules/unistd @@ -0,0 +1,31 @@ +Description: +A for systems lacking it. + +Files: +lib/unistd_.h +m4/unistd_h.m4 + +Depends-on: + +configure.ac: +gl_HEADER_UNISTD + +Makefile.am: +BUILT_SOURCES += $(UNISTD_H) +EXTRA_DIST += unistd_.h + +# We need the following in order to create when the system +# doesn't have one. +unistd.h: unistd_.h + cp $(srcdir)/unistd_.h $@-t + mv $@-t $@ +MOSTLYCLEANFILES += unistd.h unistd.h-t + +Include: +#include + +License: +LGPL + +Maintainer: +Simon Josefsson