port r3855 to release branch; as per usual this for some reason necessitates touching 6000 files for no good reason
This commit is contained in:
parent
56df1af657
commit
0b2402ee94
|
@ -33,7 +33,6 @@
|
||||||
#include <wctype.h>
|
#include <wctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <malloc.h>
|
|
||||||
|
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -42,6 +41,15 @@
|
||||||
#include "bit_ops.h"
|
#include "bit_ops.h"
|
||||||
#include "filetime.h"
|
#include "filetime.h"
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
//apple doesn't provide strnlen. how unkind
|
||||||
|
static size_t strnlen(const char *s, size_t n)
|
||||||
|
{
|
||||||
|
const char *p = (const char *)memchr(s, 0, n);
|
||||||
|
return(p ? p-s : n);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Directory entry codes
|
// Directory entry codes
|
||||||
#define DIR_ENTRY_LAST 0x00
|
#define DIR_ENTRY_LAST 0x00
|
||||||
#define DIR_ENTRY_FREE 0xE5
|
#define DIR_ENTRY_FREE 0xE5
|
||||||
|
|
|
@ -63,7 +63,11 @@ struct _reent {
|
||||||
intptr_t _errno;
|
intptr_t _errno;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
typedef __darwin_mode_t mode_t;
|
||||||
|
#else
|
||||||
typedef uint32_t mode_t;
|
typedef uint32_t mode_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct DIR_ITER {
|
struct DIR_ITER {
|
||||||
void* dirStruct;
|
void* dirStruct;
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#ifndef _MEM_ALLOCATE_H
|
#ifndef _MEM_ALLOCATE_H
|
||||||
#define _MEM_ALLOCATE_H
|
#define _MEM_ALLOCATE_H
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static inline void* _FAT_mem_allocate (size_t size) {
|
static inline void* _FAT_mem_allocate (size_t size) {
|
||||||
return malloc (size);
|
return malloc (size);
|
||||||
|
|
Loading…
Reference in New Issue