bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] random_r: new module


From: Bruno Haible
Subject: Re: [PATCH] random_r: new module
Date: Fri, 24 Oct 2008 02:06:55 +0200
User-agent: KMail/1.5.4

Simon Josefsson wrote:
> --- a/lib/stdlib.in.h
> +++ b/lib/stdlib.in.h
> @@ -220,6 +220,8 @@ extern int putenv (char *string);
>  #if @GNULIB_RANDOM_R@
>  # if address@hidden@
>  
> +#  include <stdint.h>
> +
>  #  ifndef RAND_MAX
>  #   define RAND_MAX 2147483647
>  #  endif

If you put a #include inside an extern "C" { ... } block, like this, it yields
a syntax error in C++ mode on some platforms. Better put the #include
before the extern "C" block, like this:


2008-10-23  Simon Josefsson  <address@hidden>
            Bruno Haible  <address@hidden>

        * lib/stdlib.in.h (@GNULIB_RANDOM_R@): Include stdint.h.
        * modules/random_r (Depends-on): Add stdint.

*** lib/stdlib.in.h.orig        2008-10-24 02:03:38.000000000 +0200
--- lib/stdlib.in.h     2008-10-24 02:03:29.000000000 +0200
***************
*** 41,46 ****
--- 41,50 ----
  # include <sys/loadavg.h>
  #endif
  
+ #if @GNULIB_RANDOM_R@
+ # include <stdint.h>
+ #endif
+ 
  /* The definition of GL_LINK_WARNING is copied here.  */
  
  
*** modules/random_r.orig       2008-10-24 02:03:38.000000000 +0200
--- modules/random_r    2008-10-24 02:02:04.000000000 +0200
***************
*** 7,12 ****
--- 7,13 ----
  
  Depends-on:
  stdlib
+ stdint
  
  configure.ac:
  gl_FUNC_RANDOM_R





reply via email to

[Prev in Thread] Current Thread [Next in Thread]