Remove getdtablesize(3).

This interface has been replaced with sysconf(_SC_OPEN_MAX). Note that this
implementation currently reports this as 0x10000, but there really is no
such limit in Sortix at this time.
This commit is contained in:
Jonas 'Sortie' Termansen 2013-10-02 19:14:36 +02:00
parent bae68066eb
commit 396765eaba
4 changed files with 1 additions and 35 deletions

View File

@ -426,7 +426,6 @@ unistd/fork.o \
unistd/fsync.o \
unistd/ftruncate.o \
unistd/getcwd.o \
unistd/getdtablesize.o \
unistd/getegid.o \
unistd/geteuid.o \
unistd/getgid.o \

View File

@ -363,7 +363,6 @@ ssize_t write(int, const void*, size_t);
#if defined(_SORTIX_SOURCE)
int alarmns(const struct timespec* delay, struct timespec* odelay);
int execvpe(const char*, char* const [], char* const []);
int getdtablesize(void);
size_t getpagesize(void);
int memstat(size_t* memused, size_t* memtotal);
int mkpartition(int fd, off_t start, off_t length);

View File

@ -1,33 +0,0 @@
/*******************************************************************************
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012.
This file is part of the Sortix C Library.
The Sortix 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 3 of the License, or (at your
option) any later version.
The Sortix 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 Sortix C Library. If not, see <http://www.gnu.org/licenses/>.
unistd/getdtablesize.cpp
Get descriptor table size.
*******************************************************************************/
#include <unistd.h>
// TODO: This has been replaced with sysconf(_SC_OPEN_MAX). This is only
// here for compatibility with gzip and should be removed as soon as sysconf
// is implemented.
extern "C" int getdtablesize(void)
{
return 0x10000;
}

View File

@ -33,6 +33,7 @@ extern "C" long sysconf(int name)
case _SC_CLK_TCK: return 1000;
case _SC_PAGESIZE: case _SC_PAGE_SIZE:
return getpagesize();
case _SC_OPEN_MAX: return 0x10000;
default:
fprintf(stderr, "%s:%u warning: %s(%i) is unsupported\n",
__FILE__, __LINE__, __func__, name);