Attempt at fixing MAX_PATH issues for mingw.

oldstable
Alexandre Julliard 2002-05-01 18:13:18 +00:00
parent c4e9ea1a7e
commit b53f13093e
7 changed files with 13 additions and 23 deletions

View File

@ -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__

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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);

View File

@ -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) )
{

View File

@ -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 */