File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 26
26
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
27
* SUCH DAMAGE.
28
28
*
29
- * $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.7 2003 /11/29 22:39:28 pgsql Exp $
29
+ * $PostgreSQL: pgsql/contrib/pgcrypto/random.c,v 1.8 2004 /11/23 23:44:08 neilc Exp $
30
30
*/
31
31
32
32
35
35
#include "px.h"
36
36
37
37
38
- #ifdef RAND_DEV
38
+ #if defined( RAND_DEV )
39
39
40
40
#include <errno.h>
41
41
#include <fcntl.h>
@@ -77,9 +77,8 @@ px_get_random_bytes(uint8 *dst, unsigned count)
77
77
close (fd );
78
78
return res ;
79
79
}
80
- #endif /* RAND_DEV */
81
80
82
- #ifdef RAND_SILLY
81
+ #elif defined( RAND_SILLY )
83
82
84
83
int
85
84
px_get_random_bytes (uint8 * dst , unsigned count )
@@ -90,9 +89,8 @@ px_get_random_bytes(uint8 *dst, unsigned count)
90
89
* dst ++ = random ();
91
90
return i ;
92
91
}
93
- #endif /* RAND_SILLY */
94
92
95
- #ifdef RAND_OPENSSL
93
+ #elif defined( RAND_OPENSSL )
96
94
97
95
#include <openssl/evp.h>
98
96
#include <openssl/blowfish.h>
@@ -125,4 +123,6 @@ px_get_random_bytes(uint8 *dst, unsigned count)
125
123
return -1 ;
126
124
}
127
125
128
- #endif /* RAND_OPENSSL */
126
+ #else
127
+ #error "Invalid random source"
128
+ #endif
You can’t perform that action at this time.
0 commit comments