Small changes to let it compile.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5432 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-11-21 18:23:17 +00:00
parent 90ca169469
commit cc9c5de901
3 changed files with 16 additions and 24 deletions
@@ -14,10 +14,12 @@
You should have received a copy of the GNU Lesser General Public 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 License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */ 02111-1307 USA.
*/
#include <stdio_private.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h>
#ifdef USE_IN_LIBIO #ifdef USE_IN_LIBIO
# include <libio/libioP.h> # include <libio/libioP.h>
@@ -19,16 +19,9 @@
#include <stddef.h> #include <stddef.h>
#include <stdio.h> #include <stdio.h>
#undef __getline
#ifdef USE_IN_LIBIO /** Like getdelim, but always looks for a newline. */
# include "../libio/libioP.h"
# undef ssize_t
# define ssize_t _IO_ssize_t
# define __getdelim _IO_getdelim
#endif
/* Like getdelim, but always looks for a newline. */
ssize_t ssize_t
__getline(char **lineptr, size_t *n, FILE *stream) __getline(char **lineptr, size_t *n, FILE *stream)
{ {
@@ -18,19 +18,16 @@
#include <stdio.h> #include <stdio.h>
#ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
# define fread(p, m, n, s) INTUSE(_IO_fread) (p, m, n, s)
#endif
/* Read a word (int) from STREAM. */ /** Read a word (int) from STREAM. */
int int
getw(FILE *stream) getw(FILE *stream)
{ {
int w; int w;
/* Is there a better way? */
if (fread((void *)&w, sizeof(w), 1, stream) != 1) if (fread((void *)&w, sizeof(w), 1, stream) != 1)
return EOF; return EOF;
return w; return w;
} }