mescc: Compile fixes.

* include/libmes-mini.h[WITH_GLIBC]: Do not declare strlen, write, types.
This commit is contained in:
Jan Nieuwenhuizen 2018-11-14 13:07:59 +01:00
parent e27e7af055
commit 614bfeb3b8
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 19 additions and 8 deletions

View file

@ -26,6 +26,8 @@ int g_stdin;
int g_stdout;
int g_stderr;
#if !WITH_GLIBC
#ifndef _SIZE_T
#define _SIZE_T
#ifndef __SIZE_T
@ -45,10 +47,22 @@ typedef unsigned long size_t;
#ifndef __MES_SSIZE_T
#define __MES_SSIZE_T
#undef ssize_t
#if __i386__
typedef int ssize_t;
#else
typedef long ssize_t;
#endif
#endif
#endif
#endif
#ifndef __MES_ERRNO_T
#define __MES_ERRNO_T 1
typedef int error_t;
int errno;
#endif // !__MES_ERRNO_T
#endif //!WITH_LIBC
#ifndef STDIN
#define STDIN 0
@ -62,16 +76,14 @@ typedef long ssize_t;
#define STDERR 2
#endif
#ifndef __MES_ERRNO_T
#define __MES_ERRNO_T 1
typedef int error_t;
int errno;
#endif // !__MES_ERRNO_T
size_t strlen (char const* s);
ssize_t write (int filedes, void const *buffer, size_t size);
int eputs (char const* s);
int puts (char const* s);
int oputs (char const* s);
#if !WITH_GLIBC
size_t strlen (char const* s);
ssize_t write (int filedes, void const *buffer, size_t size);
#endif // !WITH_GLIBC
#endif //__MES_LIBMES_MINI_H

View file

@ -45,7 +45,6 @@ int _open3 (char const *file_name, int flags, int mask);
int _open2 (char const *file_name, int flags);
int oputc (int c);
int oputs (char const* s);
ssize_t write (int filedes, void const *buffer, size_t size);
char *search_path (char const *file_name);
#endif //__MES_LIBMES_H