lol
at master 58 lines 1.9 kB view raw
1diff --git a/src/dir.c b/src/dir.c 2index 3e94b98..cfaa6a2 100644 3--- a/src/dir.c 4+++ b/src/dir.c 5@@ -1331,10 +1331,9 @@ local_stat (const char *path, struct stat *buf) 6 7 /* Similarly for lstat. */ 8 #if !defined(lstat) && !defined(WINDOWS32) || defined(VMS) 9-# ifndef VMS 10-# ifndef HAVE_SYS_STAT_H 11+// mes-libc implements but does not declare lstat 12+# if (!defined(VMS) && !defined(HAVE_SYS_STAT_H)) || defined(__TINYC__) 13 int lstat (const char *path, struct stat *sbuf); 14-# endif 15 # else 16 /* We are done with the fake lstat. Go back to the real lstat */ 17 # ifdef lstat 18diff --git a/src/job.c b/src/job.c 19index ea88561..8388a82 100644 20--- a/src/job.c 21+++ b/src/job.c 22@@ -2052,7 +2052,8 @@ job_next_command (struct child *child) 23 static int 24 load_too_high (void) 25 { 26-#if defined(__MSDOS__) || defined(VMS) || defined(_AMIGA) || defined(__riscos__) 27+// mes-libc does not support getloadavg 28+#if defined(__MSDOS__) || defined(VMS) || defined(_AMIGA) || defined(__riscos__) || defined (__TINYC__) 29 return 1; 30 #else 31 static double last_sec; 32diff --git a/src/main.c b/src/main.c 33index a9d3a64..664d40f 100644 34--- a/src/main.c 35+++ b/src/main.c 36@@ -2770,7 +2770,7 @@ main (int argc, char **argv, char **envp) 37 char *b = alloca (40); 38 sprintf (b, "MAKE_RESTARTS=%s%u", 39 OUTPUT_IS_TRACED () ? "-" : "", restarts); 40- putenv (b); 41+ // mes-libc does not support putenv 42 } 43 44 fflush (stdout); 45diff --git a/src/misc.c b/src/misc.c 46index eb14f40..bffca82 100644 47--- a/src/misc.c 48+++ b/src/misc.c 49@@ -653,7 +653,8 @@ get_tmppath () 50 51 # ifdef HAVE_MKTEMP 52 path = get_tmptemplate (); 53- if (*mktemp (path) == '\0') 54+ // tinycc: "src/misc.c:656: error: pointer expected" 55+ if (!strcmp(mktemp (path), "")) 56 { 57 OSS (error, NILF, 58 _("cannot generate temp path from %s: %s"), path, strerror (errno));