From 9d13fb2413921c713f83efe331e8e4d219c62c6b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 14 Dec 2005 15:06:39 +0000 Subject: Moved to csu/errno-loc.c. --- dirent/fdopendir.c | 34 ++++++++++++++++++++++++++++++++++ dirent/getdents.c | 37 +++++++++++++++++++++++++++++++++++++ dirent/getdents64.c | 36 ++++++++++++++++++++++++++++++++++++ dirent/opendir.c | 34 ++++++++++++++++++++++++++++++++++ dirent/readdir.c | 33 +++++++++++++++++++++++++++++++++ dirent/readdir64.c | 32 ++++++++++++++++++++++++++++++++ dirent/readdir64_r.c | 33 +++++++++++++++++++++++++++++++++ dirent/readdir_r.c | 35 +++++++++++++++++++++++++++++++++++ dirent/rewinddir.c | 35 +++++++++++++++++++++++++++++++++++ dirent/scandir64.c | 30 ++++++++++++++++++++++++++++++ dirent/seekdir.c | 41 +++++++++++++++++++++++++++++++++++++++++ dirent/telldir.c | 41 +++++++++++++++++++++++++++++++++++++++++ dirent/versionsort64.c | 27 +++++++++++++++++++++++++++ 13 files changed, 448 insertions(+) create mode 100644 dirent/fdopendir.c create mode 100644 dirent/getdents.c create mode 100644 dirent/getdents64.c create mode 100644 dirent/opendir.c create mode 100644 dirent/readdir.c create mode 100644 dirent/readdir64.c create mode 100644 dirent/readdir64_r.c create mode 100644 dirent/readdir_r.c create mode 100644 dirent/rewinddir.c create mode 100644 dirent/scandir64.c create mode 100644 dirent/seekdir.c create mode 100644 dirent/telldir.c create mode 100644 dirent/versionsort64.c (limited to 'dirent') diff --git a/dirent/fdopendir.c b/dirent/fdopendir.c new file mode 100644 index 0000000000..ed30e89e7e --- /dev/null +++ b/dirent/fdopendir.c @@ -0,0 +1,34 @@ +/* Open a directory stream from a file descriptor. Stub version. + Copyright (C) 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +/* Open a directory stream on FD. */ +DIR * +fdopendir (int fd) +{ + __set_errno (ENOSYS); + return NULL; +} + +stub_warning (fdopendir) +#include diff --git a/dirent/getdents.c b/dirent/getdents.c new file mode 100644 index 0000000000..1b1b7c7e8f --- /dev/null +++ b/dirent/getdents.c @@ -0,0 +1,37 @@ +/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +ssize_t +__getdirentries (fd, buf, nbytes, basep) + int fd; + char *buf; + size_t nbytes; + off_t *basep; +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (__getdirentries, getdirentries) + +stub_warning (getdirentries) +#include diff --git a/dirent/getdents64.c b/dirent/getdents64.c new file mode 100644 index 0000000000..cb30e76545 --- /dev/null +++ b/dirent/getdents64.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1991,95,96,97,99,2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +ssize_t +getdirentries64 (fd, buf, nbytes, basep) + int fd; + char *buf; + size_t nbytes; + off64_t *basep; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (getdirentries64) +#include diff --git a/dirent/opendir.c b/dirent/opendir.c new file mode 100644 index 0000000000..771013f6eb --- /dev/null +++ b/dirent/opendir.c @@ -0,0 +1,34 @@ +/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +/* Open a directory stream on NAME. */ +DIR * +__opendir (const char *name) +{ + __set_errno (ENOSYS); + return NULL; +} +weak_alias (__opendir, opendir) + +stub_warning (opendir) +#include diff --git a/dirent/readdir.c b/dirent/readdir.c new file mode 100644 index 0000000000..893b246d41 --- /dev/null +++ b/dirent/readdir.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Read a directory entry from DIRP. */ +struct dirent * +__readdir (DIR *dirp) +{ + __set_errno (ENOSYS); + return NULL; +} +weak_alias (__readdir, readdir) + +stub_warning (readdir) +#include diff --git a/dirent/readdir64.c b/dirent/readdir64.c new file mode 100644 index 0000000000..0c18bd9440 --- /dev/null +++ b/dirent/readdir64.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Read a directory entry from DIRP. */ +struct dirent64 * +__readdir64 (DIR *dirp) +{ + __set_errno (ENOSYS); + return NULL; +} +weak_alias (__readdir64, readdir64) +stub_warning (readdir64) +#include diff --git a/dirent/readdir64_r.c b/dirent/readdir64_r.c new file mode 100644 index 0000000000..cf9e952e1a --- /dev/null +++ b/dirent/readdir64_r.c @@ -0,0 +1,33 @@ +/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Read a directory entry from DIRP, store result in ENTRY and return + pointer to result in *RESULT. */ +int +readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result) +{ + __set_errno (ENOSYS); + *result = NULL; + return -1; +} +stub_warning (readdir64_r) +#include diff --git a/dirent/readdir_r.c b/dirent/readdir_r.c new file mode 100644 index 0000000000..ad45dfa504 --- /dev/null +++ b/dirent/readdir_r.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + +/* Read a directory entry from DIRP, store result in ENTRY and return + pointer to result in *RESULT. */ +int +__readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result) +{ + __set_errno (ENOSYS); + *result = NULL; + return ENOSYS; +} +weak_alias (__readdir_r, readdir_r) + +stub_warning (readdir_r) +#include diff --git a/dirent/rewinddir.c b/dirent/rewinddir.c new file mode 100644 index 0000000000..e78d316880 --- /dev/null +++ b/dirent/rewinddir.c @@ -0,0 +1,35 @@ +/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include + + +/* Rewind DIRP to the beginning of the directory. */ +void +rewinddir (dirp) + DIR *dirp; +{ + __set_errno (ENOSYS); + /* No way to indicate failure. */ +} + + +stub_warning (rewinddir) +#include diff --git a/dirent/scandir64.c b/dirent/scandir64.c new file mode 100644 index 0000000000..68608de9a0 --- /dev/null +++ b/dirent/scandir64.c @@ -0,0 +1,30 @@ +/* Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#define SCANDIR scandir64 +#define READDIR __readdir64 +#define DIRENT_TYPE struct dirent64 + +int scandir64 (__const char *__restrict __dir, + struct dirent64 ***__restrict __namelist, + int (*__selector) (__const struct dirent64 *), + int (*__cmp) (__const void *, __const void *)); + +#include diff --git a/dirent/seekdir.c b/dirent/seekdir.c new file mode 100644 index 0000000000..c3828cde0f --- /dev/null +++ b/dirent/seekdir.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +/* Seek to position POS in DIRP. */ +void +seekdir (dirp, pos) + DIR *dirp; + long int pos; +{ + if (dirp == NULL) + { + __set_errno (EINVAL); + return; + } + + __set_errno (ENOSYS); +} + + +stub_warning (seekdir) +#include diff --git a/dirent/telldir.c b/dirent/telldir.c new file mode 100644 index 0000000000..7b14452327 --- /dev/null +++ b/dirent/telldir.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991, 1995, 1996, 1997, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include +#include +#include + +/* Return the current position of DIRP. */ +long int +telldir (dirp) + DIR *dirp; +{ + if (dirp == NULL) + { + __set_errno (EINVAL); + return -1l; + } + + __set_errno (ENOSYS); + return -1l; +} + + +stub_warning (telldir) +#include diff --git a/dirent/versionsort64.c b/dirent/versionsort64.c new file mode 100644 index 0000000000..e471827023 --- /dev/null +++ b/dirent/versionsort64.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1992, 1997, 1998, 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include +#include + +int +versionsort64 (const void *a, const void *b) +{ + return __strverscmp ((*(const struct dirent64 **) a)->d_name, + (*(const struct dirent64 **) b)->d_name); +} -- cgit v1.2.3