|
|
|
@ -32,7 +32,7 @@ extern int opt_worksize;
@@ -32,7 +32,7 @@ extern int opt_worksize;
|
|
|
|
|
|
|
|
|
|
char *file_contents(const char *filename, int *length) |
|
|
|
|
{ |
|
|
|
|
FILE *f = fopen(filename, "r"); |
|
|
|
|
FILE *f = fopen(filename, "rb"); |
|
|
|
|
void *buffer; |
|
|
|
|
|
|
|
|
|
if (!f) { |
|
|
|
@ -385,7 +385,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
@@ -385,7 +385,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
|
|
|
|
|
strcat(binaryfilename, numbuf); |
|
|
|
|
strcat(binaryfilename, ".bin"); |
|
|
|
|
|
|
|
|
|
binaryfile = fopen(binaryfilename, "r"); |
|
|
|
|
binaryfile = fopen(binaryfilename, "rb"); |
|
|
|
|
if (!binaryfile) { |
|
|
|
|
if (opt_debug) |
|
|
|
|
applog(LOG_DEBUG, "No binary found, generating from source"); |
|
|
|
@ -571,7 +571,7 @@ build:
@@ -571,7 +571,7 @@ build:
|
|
|
|
|
free(rawsource); |
|
|
|
|
|
|
|
|
|
/* Save the binary to be loaded next time */ |
|
|
|
|
binaryfile = fopen(binaryfilename, "w"); |
|
|
|
|
binaryfile = fopen(binaryfilename, "wb"); |
|
|
|
|
if (!binaryfile) { |
|
|
|
|
/* Not a fatal problem, just means we build it again next time */ |
|
|
|
|
if (opt_debug) |
|
|
|
|