summaryrefslogtreecommitdiff
path: root/klibc/klibc/fread2.c
blob: 9e5ac81fc2caf7e2abe687f28ac2e46f5b319a9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * fread2.c
 *
 * The actual fread() function as a non-inline
 */

#define __NO_FREAD_FWRITE_INLINES
#include <stdio.h>

size_t fread(void *ptr, size_t size, size_t nmemb, FILE *f)
{
  return _fread(ptr, size*nmemb, f)/size;
}