+#define _DE_ISREG(t) ((t) != 0x0F)
+#define _DE_ISDIR(t) ((t) == 0x0F)
+#define _DE_ISLBL(t) (0)
+#define _DE_ISLNK(t) (0)
+
+#elif defined(__ATARI__)
+
+struct dirent {
+ char d_name[13]; /* 8.3 + trailing 0 */
+ unsigned char d_type;
+};
+
+#define _DE_ISREG(t) ((t) != 0xC4)
+#define _DE_ISDIR(t) ((t) == 0xC4)
+#define _DE_ISLBL(t) (0)
+#define _DE_ISLNK(t) (0)
+
+#elif defined(__CBM__)
+
+struct dirent {
+ char d_name[16+1];
+ unsigned int d_off;
+ unsigned int d_blocks;
+ unsigned char d_type; /* See _CBM_T_xxx defines */
+
+ /* bsd extensions */
+ unsigned char d_namlen;
+};
+
+/* File type specification macros. We need definitions of CBM file types. */
+#include <cbm_filetype.h>
+
+#define _DE_ISREG(t) (((t) & _CBM_T_REG) != 0)
+#define _DE_ISDIR(t) ((t) == _CBM_T_DIR)
+#define _DE_ISLBL(t) ((t) == _CBM_T_HEADER)
+#define _DE_ISLNK(t) ((t) == _CBM_T_LNK)
+
+#elif defined(__LYNX__)
+
+struct dirent {
+ unsigned char d_blocks;
+ unsigned int d_offset;
+ char d_type;
+ void *d_address;
+ unsigned int d_size;
+};
+
+extern struct dirent FileEntry;
+#pragma zpsym ("FileEntry");
+
+#define _DE_ISREG(t) (1)
+#define _DE_ISDIR(t) (0)
+#define _DE_ISLBL(t) (0)
+#define _DE_ISLNK(t) (0)
+
+#else