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:
@@ -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,20 +19,13 @@
|
|||||||
#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)
|
||||||
{
|
{
|
||||||
return __getdelim (lineptr, n, '\n', stream);
|
return __getdelim(lineptr, n, '\n', stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__getline, getline)
|
weak_alias(__getline, getline)
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user