[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] STAT bits - Ouch!



Alan Hourihane wrote:
Given, pretty much, every unix'ish style OS defines these....

#define __S_IFDIR       0040000 /* Directory.  */
#define __S_IFCHR       0020000 /* Character device.  */
#define __S_IFBLK       0060000 /* Block device.  */
#define __S_IFREG       0100000 /* Regular file.  */
#define __S_IFIFO       0010000 /* FIFO.  */
#define __S_IFLNK       0120000 /* Symbolic link.  */
#define __S_IFSOCK      0140000 /* Socket.  */

On FreeMiNT, we do this....

#define __S_IFDIR       0040000 /* Directory.  */
#define __S_IFCHR       0020000 /* Character device.  */
#define __S_IFBLK       0060000 /* Block device.  */
#define __S_IFREG       0100000 /* Regular file.  */
#define __S_IFIFO       0120000 /* FIFO.  */
#define __S_IFLNK       0160000 /* Symbolic link.  */
#define __S_IFSOCK      0010000 /* Socket.  */

Compatibility issues are always critical...

Are the UNIX values really the same on every other OS ?

If they are different on FreeMiNT, maybe there was a good reason in early days ? Or maybe a simple typo ?

For me the best solution would be to switch FreeMiNT to the standard values, and recompile every software against the new MiNTLib... but of course it is unrealistic.

--
Vincent Rivière