# HG changeset patch # User Simon Josefsson # Date 1141738251 0 # Node ID 143f906c9a6a833d2bc68f7b0bbfbec70ae624a7 # Parent 668b3d8c9981cb9134a65ffaa729480f2d80b204 Fix use of unistd.h in getopt through a new unistd module. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +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. diff --git a/lib/ChangeLog b/lib/ChangeLog --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2006-03-07 Simon Josefsson + + * unistd_.h: New file. + 2006-03-07 Simon Josefsson * gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM. diff --git a/lib/unistd_.h b/lib/unistd_.h new file mode 100644 --- /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 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +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 diff --git a/modules/getopt b/modules/getopt --- a/modules/getopt +++ b/modules/getopt @@ -10,6 +10,7 @@ Depends-on: gettext-h +unistd configure.ac: gl_GETOPT diff --git a/modules/unistd b/modules/unistd new file mode 100644 --- /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