From 6448e4cf51dfbcc1b335e254c3fed1452876cb4e Mon Sep 17 00:00:00 2001 From: cuz Date: Tue, 19 Apr 2005 13:15:52 +0000 Subject: [PATCH] Fixed FILENAME_MAX git-svn-id: svn://svn.cc65.org/cc65/trunk@3469 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- asminc/stdio.inc | 10 +++++----- include/stdio.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) 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 -- 2.39.5