1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Portability fixes

This commit is contained in:
monty@mashka.mysql.fi
2003-03-11 00:30:35 +02:00
parent 9257a27c82
commit 2d09c5bf9c
3 changed files with 27 additions and 33 deletions

View File

@ -369,6 +369,14 @@ el_line(EditLine *el)
static const char elpath[] = "/.editrc";
#if defined(MAXPATHLEN)
#define LIBEDIT_MAXPATHLEN MAXPATHLEN
#elif defined(PATH_MAX)
#define LIBEDIT_MAXPATHLEN PATH_MAX
#else
#define LIBEDIT_MAXPATHLEN 1024
#endif
/* el_source():
* Source a file
*/
@ -377,7 +385,7 @@ el_source(EditLine *el, const char *fname)
{
FILE *fp;
size_t len;
char *ptr, path[MAXPATHLEN];
char *ptr, path[LIBEDIT_MAXPATHLEN];
fp = NULL;
if (fname == NULL) {