[llvm-commits] CVS: llvm/test/DSGraphs/dummylib.c

Chris Lattner lattner at cs.uiuc.edu
Fri Nov 8 14:49:10 PST 2002


Changes in directory llvm/test/DSGraphs:

dummylib.c updated: 1.1 -> 1.2

---
Log message:

Add a bunch more stubs


---
Diffs of the changes:

Index: llvm/test/DSGraphs/dummylib.c
diff -u llvm/test/DSGraphs/dummylib.c:1.1 llvm/test/DSGraphs/dummylib.c:1.2
--- llvm/test/DSGraphs/dummylib.c:1.1	Sun Nov  3 06:39:43 2002
+++ llvm/test/DSGraphs/dummylib.c	Fri Nov  8 14:47:52 2002
@@ -1,6 +1,8 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <time.h>
 
+void srand(unsigned x) {}
 double exp(double x) { return 0; }
 double log(double x) { return 0; }
 double sqrt(double x) { return 0; }
@@ -17,6 +19,15 @@
 char *strcpy(char*Str1, const char *Str) { return Str1; }
 #undef putchar
 int putchar(int N) { return N; }
+int putc(int c, FILE *stream) { return c; }
+int fputc(int c, FILE *stream) { return c; }
+int fgetc(FILE *S) { return 0; }
+int getc(FILE *S) { return 0; }
+size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { return 0; }
+int fseek(FILE *stream, long offset, int whence) { return 0; }
+int fputs(const char *s, FILE *stream) { return 0; }
+void rewind(FILE*F) { }
+
 
 void *calloc(size_t A, size_t B) { return malloc(A*B); }
 void *realloc(void *ptr, size_t N) { return ptr; } 
@@ -27,10 +38,24 @@
 int memcmp(const char *A, const char *B, size_t N) { return 0; }
 ssize_t read(int fildes, void *buf, size_t nbyte) { return nbyte; }
 int close(int FD) { return 0; }
+int rename(const char *oldpath, const char *newpath) { return 0; }
+
 
-const *strchr(const char *S, int N) { return S; } 
+
+char *strchr(const char *s, int c) { return (char*)s; }
 int strcmp(const char *s1, const char *s2) { return 0; }
 int strncmp(const char *s1, const char *s2, size_t n) { return 0; }
 char *strncpy(char *s1, const char *s2, size_t n) { return s1; }
+char *strpbrk(const char *s, const char *accept) { return (char*)s; }
+
+long clock() { return 0; }
+char *ctime(const time_t *timep) { return 0; }
+time_t time(time_t *t) { return *t = 0; }
 
+double sin(double x) { return x; }
+double cos(double x) { return x; }
+double atan(double x) { return x; }
+double pow(double x, double y) { return x; }
+int tolower(int x) { return x; }
+int toupper(int x) { return x; }
 





More information about the llvm-commits mailing list