|
|
|
@ -31,7 +31,7 @@ extern int opt_worksize;
@@ -31,7 +31,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) { |
|
|
|
@ -384,7 +384,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
@@ -384,7 +384,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"); |
|
|
|
@ -570,7 +570,7 @@ build:
@@ -570,7 +570,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) |
|
|
|
|