mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
Update.
* sysdeps/unix/sysv/aix/linux/linux-dirent.h: New file. * sysdeps/unix/sysv/aix/linux/direntconv.c: New file.
This commit is contained in:
parent
782af2c07f
commit
0f50c8d300
@ -1,5 +1,8 @@
|
||||
2000-05-01 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/aix/linux/linux-dirent.h: New file.
|
||||
* sysdeps/unix/sysv/aix/linux/direntconv.c: New file.
|
||||
|
||||
* posix/Versions: Change posix_spawnattr_getdefault and
|
||||
posix_spawnattr_setdefault to posix_spawnattr_getsigdefault
|
||||
and posix_spawnattr_setsigdefault respectively.
|
||||
|
31
sysdeps/unix/sysv/aix/linux/direntconv.c
Normal file
31
sysdeps/unix/sysv/aix/linux/direntconv.c
Normal file
@ -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);
|
||||
}
|
19
sysdeps/unix/sysv/aix/linux/linux-dirent.h
Normal file
19
sysdeps/unix/sysv/aix/linux/linux-dirent.h
Normal file
@ -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! */
|
||||
};
|
Loading…
Reference in New Issue
Block a user