strcpy(((krb5_scc_data *) lid->data)->filename, scratch);
/* Make sure the file name is useable */
+#if defined(__STDC__)
+ f = fopen (((krb5_scc_data *) lid->data)->filename, "wb+");
+#else
f = fopen (((krb5_scc_data *) lid->data)->filename, "w+");
+#endif
if (!f)
return krb5_scc_interpret (errno);
else {
(void) fclose (data->file);
data->file = 0;
}
+#if defined(__STDC__)
+ switch(mode) {
+ case SCC_OPEN_AND_ERASE:
+ open_flag = "wb+";
+ break;
+ case SCC_OPEN_RDWR:
+ open_flag = "rb+";
+ break;
+ case SCC_OPEN_RDONLY:
+ default:
+ open_flag = "rb";
+ break;
+ }
+#else
switch(mode) {
case SCC_OPEN_AND_ERASE:
open_flag = "w+";
open_flag = "r";
break;
}
+#endif
f = fopen (data->filename, open_flag);
if (!f)