Commit b53f1309 authored by Alexandre Julliard's avatar Alexandre Julliard

Attempt at fixing MAX_PATH issues for mingw.

parent c4e9ea1a
......@@ -29,7 +29,7 @@
#define NR_NAME_HASH 16384
#ifndef PATH_MAX
#define PATH_MAX _MAX_PATH
#define PATH_MAX MAX_PATH
#endif
#ifdef __i386__
......
......@@ -35,7 +35,7 @@
#include <string.h>
#include <unistd.h>
#ifndef PATH_MAX
#define PATH_MAX _MAX_PATH
#define PATH_MAX MAX_PATH
#endif
#include "debugger.h"
......
......@@ -32,7 +32,7 @@
#include <string.h>
#include <unistd.h>
#ifndef PATH_MAX
#define PATH_MAX _MAX_PATH
#define PATH_MAX MAX_PATH
#endif
#include "debugger.h"
......
......@@ -34,7 +34,7 @@
#include <string.h>
#include <unistd.h>
#ifndef PATH_MAX
#define PATH_MAX _MAX_PATH
#define PATH_MAX MAX_PATH
#endif
#include "debugger.h"
......
......@@ -215,7 +215,7 @@ int _wfindnext(long hand, struct _wfinddata_t * ft)
*/
char* _getcwd(char * buf, int size)
{
char dir[_MAX_PATH];
char dir[MAX_PATH];
int dir_len = GetCurrentDirectoryA(MAX_PATH,dir);
if (dir_len < 1)
......@@ -241,7 +241,7 @@ char* _getcwd(char * buf, int size)
*/
WCHAR* _wgetcwd(WCHAR * buf, int size)
{
WCHAR dir[_MAX_PATH];
WCHAR dir[MAX_PATH];
int dir_len = GetCurrentDirectoryW(MAX_PATH,dir);
if (dir_len < 1)
......@@ -286,7 +286,7 @@ char* _getdcwd(int drive, char * buf, int size)
return _getcwd(buf,size); /* current */
else
{
char dir[_MAX_PATH];
char dir[MAX_PATH];
char drivespec[4] = {'A', ':', '\\', 0};
int dir_len;
......@@ -297,7 +297,7 @@ char* _getdcwd(int drive, char * buf, int size)
return NULL;
}
dir_len = GetFullPathNameA(drivespec,_MAX_PATH,dir,&dummy);
dir_len = GetFullPathNameA(drivespec,MAX_PATH,dir,&dummy);
if (dir_len >= size || dir_len < 1)
{
SET_THREAD_VAR(errno,MSVCRT_ERANGE);
......@@ -326,7 +326,7 @@ WCHAR* _wgetdcwd(int drive, WCHAR * buf, int size)
return _wgetcwd(buf,size); /* current */
else
{
WCHAR dir[_MAX_PATH];
WCHAR dir[MAX_PATH];
WCHAR drivespec[4] = {'A', ':', '\\', 0};
int dir_len;
......@@ -337,7 +337,7 @@ WCHAR* _wgetdcwd(int drive, WCHAR * buf, int size)
return NULL;
}
dir_len = GetFullPathNameW(drivespec,_MAX_PATH,dir,&dummy);
dir_len = GetFullPathNameW(drivespec,MAX_PATH,dir,&dummy);
if (dir_len >= size || dir_len < 1)
{
SET_THREAD_VAR(errno,MSVCRT_ERANGE);
......
......@@ -137,12 +137,12 @@ QueryPathOfRegTypeLib(
HRESULT hr = E_FAIL;
DWORD dwPathLen = _MAX_PATH;
LCID myLCID = lcid;
char szXGUID[80];
char szTypeLibKey[100];
char szPath[dwPathLen];
char szPath[MAX_PATH];
DWORD dwPathLen = sizeof(szPath);
if ( !HIWORD(guid) )
{
......
......@@ -149,17 +149,7 @@ typedef INT (CALLBACK *PROC)();
#endif
#endif /* NOMINMAX */
#ifndef _MAX_PATH
/* FIXME: These are supposed to be in stdlib.h only */
#define _MAX_DRIVE 3
#define _MAX_FNAME 256
#define _MAX_DIR _MAX_FNAME
#define _MAX_EXT _MAX_FNAME
#define _MAX_PATH 260
#endif
#define MAX_PATH _MAX_PATH
#define MAX_PATH 260
#define HFILE_ERROR ((HFILE)-1)
/* The SIZE structure */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment