mescc: Support gcc-3.2: puts with newline.

* lib/libc-mini.c (oputs): Rename from puts.
  (puts): New function: Add newline.
This commit is contained in:
Jan Nieuwenhuizen 2018-06-06 15:55:03 +02:00
parent eb939b11b8
commit 0f3856f7b4
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
3 changed files with 12 additions and 2 deletions

View file

@ -36,5 +36,6 @@ int fdungetc (int c, int fd);
int isdigit (int c);
int isspace (int c);
int isxdigit (int c);
int oputs (char const* s);
#endif //__MES_LIBMES_H

View file

@ -60,10 +60,12 @@ int mkdir (char const *file_name, mode_t mode);
int chown (char const *file_name, uid_t owner, gid_t group);
int rmdir (char const *file_name);
#define S_IFMT 0170000
#define S_IFCHR 0020000
#define S_IFDIR 0040000
#define S_IFBLK 0060000
#define S_IFREG 0100000
#define S_IFLNK 0120000
#define S_IFMT 0170000
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)

View file

@ -49,13 +49,20 @@ eputs (char const* s)
}
int
puts (char const* s)
oputs (char const* s)
{
int i = strlen (s);
write (1, s, i);
return 0;
}
int
puts (char const* s)
{
oputs (s);
return oputs ("\n");
}
#if __MESC__
#include <linux-mini-mes.c>