has been defined. Previously, pgcrypto would compile but would be
unusable.
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.7 2003/11/29 22:39:28 pgsql Exp $
+ * $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.8 2004/11/23 23:44:08 neilc Exp $
*/
#include "px.h"
-#ifdef RAND_DEV
+#if defined(RAND_DEV)
#include
#include
close(fd);
return res;
}
-#endif /* RAND_DEV */
-#ifdef RAND_SILLY
+#elif defined(RAND_SILLY)
int
px_get_random_bytes(uint8 *dst, unsigned count)
*dst++ = random();
return i;
}
-#endif /* RAND_SILLY */
-#ifdef RAND_OPENSSL
+#elif defined(RAND_OPENSSL)
#include
#include
return -1;
}
-#endif /* RAND_OPENSSL */
+#else
+#error "Invalid random source"
+#endif