aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-01 23:44:22 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-01 23:44:22 +0000
commit0f50c8d300b6635259496082162835d8a1e4cab4 (patch)
tree170697c347935912e4f26ef8ca73311674952822 /sysdeps/unix
parent782af2c07f1a0ec7894aec2b8305b614bb338941 (diff)
downloadglibc-0f50c8d300b6635259496082162835d8a1e4cab4.zip
glibc-0f50c8d300b6635259496082162835d8a1e4cab4.tar.gz
glibc-0f50c8d300b6635259496082162835d8a1e4cab4.tar.bz2
Update.
* sysdeps/unix/sysv/aix/linux/linux-dirent.h: New file. * sysdeps/unix/sysv/aix/linux/direntconv.c: New file.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/aix/linux/direntconv.c31
-rw-r--r--sysdeps/unix/sysv/aix/linux/linux-dirent.h19
2 files changed, 50 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/aix/linux/direntconv.c b/sysdeps/unix/sysv/aix/linux/direntconv.c
new file mode 100644
index 0000000..620a0a0
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/direntconv.c
@@ -0,0 +1,31 @@
+#include <dirent.h>
+#include <string.h>
+#include "linux-dirent.h"
+
+#ifndef DT_UNKNOWN
+# define DT_UNKNOWN 0
+#endif
+
+
+void
+__dirent_aix_to_linux (const struct dirent *aixdir,
+ struct linuxdirent *linuxdir)
+{
+ linuxdir->d_ino = aixdir->d_ino;
+ linuxdir->d_off = aixdir->d_off;
+ linuxdir->d_reclen = aixdir->d_reclen;
+ linuxdir->d_type = DT_UNKNOWN;
+ strncpy (linuxdir->d_name, aixdir->d_name, 256);
+}
+
+
+void
+__dirent64_aix_to_linux (const struct dirent64 *aixdir,
+ struct linuxdirent64 *linuxdir)
+{
+ linuxdir->d_ino = aixdir->d_ino;
+ linuxdir->d_off = aixdir->d_off;
+ linuxdir->d_reclen = aixdir->d_reclen;
+ linuxdir->d_type = DT_UNKNOWN;
+ strncpy (linuxdir->d_name, aixdir->d_name, 256);
+}
diff --git a/sysdeps/unix/sysv/aix/linux/linux-dirent.h b/sysdeps/unix/sysv/aix/linux/linux-dirent.h
new file mode 100644
index 0000000..935ffda
--- /dev/null
+++ b/sysdeps/unix/sysv/aix/linux/linux-dirent.h
@@ -0,0 +1,19 @@
+#include "linuxtypes.h"
+
+struct linuxdirent
+ {
+ __linux_ino_t d_ino;
+ __linux_off_t d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256]; /* We must not include limits.h! */
+ };
+
+struct linuxdirent64
+ {
+ __linux_ino64_t d_ino;
+ __linux_off64_t d_off;
+ unsigned short int d_reclen;
+ unsigned char d_type;
+ char d_name[256]; /* We must not include limits.h! */
+ };