Re: seconds bug in dir()

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
jimcbrown said...

Watcom supports the stat() function, so we may be able to use the Unix Dir() implementation on Watcom as well, instead of having two separate Dir() implementations... I think that would fix this bug.

Ok, let's give it a try and failing that we use the Windows API directly. Can you do the coding as I find it very hard to test in my linux set up (involves a LOT of set up work first).

The change is three one-liners... all of which involve #ifdef changes only..

// 2 implementations of dir() 
 
#ifdef EWATCOM 
        // 2 of 3: WATCOM method 
 

becomes

// 2 implementations of dir() 
 
#if 0 //def EWATCOM 
        // 2 of 3: WATCOM method 
 

then

#endif 
 
#if defined(EUNIX) || defined(EMINGW) 
        // 3 of 3: Unix style with stat() 
	static object Dir(object x) 
	 

becomes

#endif 
 
#if defined(EUNIX) || defined(EMINGW) || defined(EWATCOM) 
        // 3 of 3: Unix style with stat() 
	static object Dir(object x) 
	 

and finally

#if defined(EMINGW) 
#define full_name_size (MAX_FILE_NAME + 257) 
#else 
#define full_name_size (MAX_FILE_NAME + NAME_MAX + 1) 
#endif 

becomes

#if defined(EMINGW) || defined(EWATCOM) 
#define full_name_size (MAX_FILE_NAME + 257) 
#else 
#define full_name_size (MAX_FILE_NAME + NAME_MAX + 1) 
#endif 

If this breaks on watcom (e.g. you get a compile error) then we should look at using a pure w32api Dir() on watcom.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu