From: Bruno Haible <bruno@clisp.org> Date: Mon, 11 Oct 2010 22:38:19 +0000 (+0200) Subject: stdlib: Allow multiple gnulib generated replacements to coexist. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e70b0dfb6c430c1ab6d65b88e475ebb01c7ac2fe;p=pspp stdlib: Allow multiple gnulib generated replacements to coexist. * lib/stdlib.in.h (struct random_data): Avoid identical redefinition. Reported by Sam Steingold <sds@gnu.org>. --- diff --git a/ChangeLog b/ChangeLog index acf980b7bb..25790a619d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-10-11 Bruno Haible <bruno@clisp.org> + + stdlib: Allow multiple gnulib generated replacements to coexist. + * lib/stdlib.in.h (struct random_data): Avoid identical redefinition. + Reported by Sam Steingold <sds@gnu.org>. + 2010-10-11 Jim Meyering <meyering@redhat.com> fix a documentation typo diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 6fe75d330f..e6dcdbc841 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -61,6 +61,9 @@ #endif #if !@HAVE_STRUCT_RANDOM_DATA@ +/* Define 'struct random_data'. + But allow multiple gnulib generated <stdlib.h> replacements to coexist. */ +# if !GNULIB_defined_struct_random_data struct random_data { int32_t *fptr; /* Front pointer. */ @@ -71,6 +74,8 @@ struct random_data int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; +# define GNULIB_defined_struct_random_data 1 +# endif #endif #if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)