CompCert compatibility

This commit is contained in:
Frank Denis
2015-10-26 16:59:28 +01:00
parent 4b1478cd5b
commit 771e32bd18
8 changed files with 14 additions and 6 deletions
@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <limits.h>
#include <string.h>
@@ -24,10 +24,10 @@
* SUCH DAMAGE.
*/
#include <stdlib.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "crypto_auth_hmacsha256.h"
@@ -1,7 +1,7 @@
#ifndef crypto_onetimeauth_poly1305_H
#define crypto_onetimeauth_poly1305_H
#include <stddef.h>
#include <stdlib.h>
#include "export.h"
#ifdef __cplusplus
+1
View File
@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <sys/types.h>
#include <assert.h>
@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <sys/types.h>
#ifndef _WIN32
# include <sys/stat.h>
@@ -13,7 +14,6 @@
#include <fcntl.h>
#include <limits.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#ifndef _MSC_VER
# include <unistd.h>
@@ -135,7 +135,9 @@ randombytes_salsa20_random_random_dev_open(void)
fd = open(*device, O_RDONLY);
if (fd != -1) {
if (fstat(fd, &st) == 0 &&
# ifdef S_ISNAM
# ifdef __COMPCERT__
1
# elif defined(S_ISNAM)
(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode))
# else
S_ISCHR(st.st_mode)
@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <sys/types.h>
#ifndef _WIN32
# include <sys/stat.h>
@@ -13,7 +14,6 @@
#include <fcntl.h>
#include <limits.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
# include <unistd.h>
@@ -120,7 +120,9 @@ randombytes_sysrandom_random_dev_open(void)
fd = open(*device, O_RDONLY);
if (fd != -1) {
if (fstat(fd, &st) == 0 &&
# ifdef S_ISNAM
# ifdef __COMPCERT__
1
# elif defined(S_ISNAM)
(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode))
# else
S_ISCHR(st.st_mode)
+1
View File
@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <sys/types.h>
#include <limits.h>
+1
View File
@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <sys/types.h>
#include <limits.h>