diff --git a/asminc/stdio.inc b/asminc/stdio.inc index e2f1beff9..ab9d86d2c 100644 --- a/asminc/stdio.inc +++ b/asminc/stdio.inc @@ -42,15 +42,15 @@ _IONBF = 2 BUFSIZ = 256 EOF = -1 .if .defined(__APPLE2__) .or .defined(__APPLE2ENH__) -FILENAME_MAX = 64 +FILENAME_MAX = 64+1 .elseif .defined(__ATARI__) -FILENAME_MAX = 12 +FILENAME_MAX = 12+1 .elseif .defined(__LUNIX__) -FILENAME_MAX = 80 +FILENAME_MAX = 80+1 .else -FILENAME_MAX = 16 +FILENAME_MAX = 16+1 .endif -L_tmpnam = (FILENAME_MAX + 1) +L_tmpnam = FILENAME_MAX SEEK_CUR = 0 SEEK_END = 1 SEEK_SET = 2 diff --git a/include/stdio.h b/include/stdio.h index 771c4193b..8fac60d15 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -70,15 +70,15 @@ extern FILE* stderr; /* Standard defines that are platform dependent */ #if defined(__APPLE2__) || defined(__APPLE2ENH__) -# define FILENAME_MAX 64 +# define FILENAME_MAX (64+1) #elif defined(__ATARI__) -# define FILENAME_MAX 12 +# define FILENAME_MAX (12+1) #elif defined(__LUNIX__) -# define FILENAME_MAX 80 +# define FILENAME_MAX (80+1) #else -# define FILENAME_MAX 16 +# define FILENAME_MAX (16+1) #endif -#define L_tmpnam (FILENAME_MAX + 1) +#define L_tmpnam FILENAME_MAX