bug-gnulib
[Top][All Lists]
Advanced

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

Re: gc.m4 and hard failure


From: Simon Josefsson
Subject: Re: gc.m4 and hard failure
Date: Wed, 08 Mar 2006 10:36:28 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> Better, thanks.  But
>   --disable-random-device  (--enable-random-devide=no)
> could IMVHO still be given a useful meaning, which it currently does not
> have.  Since I don't actually use this code in any project, I can't tell
> you how realistic this usage case would be.

I'm inclined to fix this in the source code, so that
--disable-random-device actually end up disabling the use of just that
device.  What do you think?

--- gc-gnulib.c 07 Mar 2006 14:14:40 +0100      1.17
+++ gc-gnulib.c 08 Mar 2006 10:35:01 +0100      
@@ -109,6 +109,9 @@
       break;
     }
 
+  if (strcmp (device, "no") == 0)
+    return GC_RANDOM_ERROR;
+
   fd = open (device, O_RDONLY);
   if (fd < 0)
     return GC_RANDOM_ERROR;

>> +  case "${target}" in
>
> Why do you use $target?  Are you putting this in a compiler?
> It'd be good to precede with
>   AC_REQUIRE([AC_CANONICAL_HOST])dnl
>
> and then you really want
>    case $host in
>
>> +    *-openbsd*)
>
>        *-*-openbsd*)
>
> You could also just test $host_os, and then match
>        openbsd*)
> only.

I've changed it to use $host_os.

Thanks,
Simon




reply via email to

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