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:
parent
eb939b11b8
commit
0f3856f7b4
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue