Explorar el Código

First commit

Skeleton for code analyser
Lucas de Souza hace 5 años
commit
050cdb7c51
Se han modificado 100 ficheros con 763 adiciones y 0 borrados
  1. 2 0
      .gitignore
  2. 116 0
      cjson.py
  3. 30 0
      files.py
  4. 4 0
      utils/fake_libc_include/X11/Intrinsic.h
  5. 4 0
      utils/fake_libc_include/X11/Xlib.h
  6. 16 0
      utils/fake_libc_include/X11/_X11_fake_defines.h
  7. 38 0
      utils/fake_libc_include/X11/_X11_fake_typedefs.h
  8. 2 0
      utils/fake_libc_include/_ansi.h
  9. 201 0
      utils/fake_libc_include/_fake_defines.h
  10. 172 0
      utils/fake_libc_include/_fake_typedefs.h
  11. 2 0
      utils/fake_libc_include/_syslist.h
  12. 2 0
      utils/fake_libc_include/aio.h
  13. 2 0
      utils/fake_libc_include/alloca.h
  14. 2 0
      utils/fake_libc_include/ar.h
  15. 2 0
      utils/fake_libc_include/argz.h
  16. 2 0
      utils/fake_libc_include/arpa/inet.h
  17. 2 0
      utils/fake_libc_include/asm-generic/int-ll64.h
  18. 2 0
      utils/fake_libc_include/assert.h
  19. 2 0
      utils/fake_libc_include/complex.h
  20. 2 0
      utils/fake_libc_include/cpio.h
  21. 2 0
      utils/fake_libc_include/ctype.h
  22. 2 0
      utils/fake_libc_include/dirent.h
  23. 2 0
      utils/fake_libc_include/dlfcn.h
  24. 2 0
      utils/fake_libc_include/endian.h
  25. 2 0
      utils/fake_libc_include/envz.h
  26. 2 0
      utils/fake_libc_include/errno.h
  27. 2 0
      utils/fake_libc_include/fastmath.h
  28. 2 0
      utils/fake_libc_include/fcntl.h
  29. 2 0
      utils/fake_libc_include/features.h
  30. 2 0
      utils/fake_libc_include/fenv.h
  31. 2 0
      utils/fake_libc_include/float.h
  32. 2 0
      utils/fake_libc_include/fmtmsg.h
  33. 2 0
      utils/fake_libc_include/fnmatch.h
  34. 2 0
      utils/fake_libc_include/ftw.h
  35. 2 0
      utils/fake_libc_include/getopt.h
  36. 2 0
      utils/fake_libc_include/glob.h
  37. 2 0
      utils/fake_libc_include/grp.h
  38. 2 0
      utils/fake_libc_include/iconv.h
  39. 2 0
      utils/fake_libc_include/ieeefp.h
  40. 2 0
      utils/fake_libc_include/inttypes.h
  41. 2 0
      utils/fake_libc_include/iso646.h
  42. 2 0
      utils/fake_libc_include/langinfo.h
  43. 2 0
      utils/fake_libc_include/libgen.h
  44. 2 0
      utils/fake_libc_include/libintl.h
  45. 2 0
      utils/fake_libc_include/limits.h
  46. 2 0
      utils/fake_libc_include/linux/socket.h
  47. 2 0
      utils/fake_libc_include/linux/version.h
  48. 2 0
      utils/fake_libc_include/locale.h
  49. 2 0
      utils/fake_libc_include/malloc.h
  50. 2 0
      utils/fake_libc_include/math.h
  51. 2 0
      utils/fake_libc_include/mir_toolkit/client_types.h
  52. 2 0
      utils/fake_libc_include/monetary.h
  53. 2 0
      utils/fake_libc_include/mqueue.h
  54. 2 0
      utils/fake_libc_include/ndbm.h
  55. 2 0
      utils/fake_libc_include/net/if.h
  56. 2 0
      utils/fake_libc_include/netdb.h
  57. 2 0
      utils/fake_libc_include/netinet/in.h
  58. 2 0
      utils/fake_libc_include/netinet/tcp.h
  59. 2 0
      utils/fake_libc_include/newlib.h
  60. 2 0
      utils/fake_libc_include/nl_types.h
  61. 2 0
      utils/fake_libc_include/openssl/err.h
  62. 2 0
      utils/fake_libc_include/openssl/evp.h
  63. 2 0
      utils/fake_libc_include/openssl/hmac.h
  64. 2 0
      utils/fake_libc_include/openssl/ssl.h
  65. 2 0
      utils/fake_libc_include/openssl/x509v3.h
  66. 2 0
      utils/fake_libc_include/paths.h
  67. 2 0
      utils/fake_libc_include/poll.h
  68. 2 0
      utils/fake_libc_include/process.h
  69. 2 0
      utils/fake_libc_include/pthread.h
  70. 2 0
      utils/fake_libc_include/pwd.h
  71. 2 0
      utils/fake_libc_include/reent.h
  72. 2 0
      utils/fake_libc_include/regdef.h
  73. 2 0
      utils/fake_libc_include/regex.h
  74. 2 0
      utils/fake_libc_include/sched.h
  75. 2 0
      utils/fake_libc_include/search.h
  76. 2 0
      utils/fake_libc_include/semaphore.h
  77. 2 0
      utils/fake_libc_include/setjmp.h
  78. 2 0
      utils/fake_libc_include/signal.h
  79. 2 0
      utils/fake_libc_include/spawn.h
  80. 2 0
      utils/fake_libc_include/stdarg.h
  81. 2 0
      utils/fake_libc_include/stdbool.h
  82. 2 0
      utils/fake_libc_include/stddef.h
  83. 2 0
      utils/fake_libc_include/stdint.h
  84. 2 0
      utils/fake_libc_include/stdio.h
  85. 2 0
      utils/fake_libc_include/stdlib.h
  86. 2 0
      utils/fake_libc_include/string.h
  87. 2 0
      utils/fake_libc_include/strings.h
  88. 2 0
      utils/fake_libc_include/stropts.h
  89. 2 0
      utils/fake_libc_include/sys/ioctl.h
  90. 2 0
      utils/fake_libc_include/sys/ipc.h
  91. 2 0
      utils/fake_libc_include/sys/mman.h
  92. 2 0
      utils/fake_libc_include/sys/msg.h
  93. 2 0
      utils/fake_libc_include/sys/poll.h
  94. 2 0
      utils/fake_libc_include/sys/resource.h
  95. 2 0
      utils/fake_libc_include/sys/select.h
  96. 2 0
      utils/fake_libc_include/sys/sem.h
  97. 2 0
      utils/fake_libc_include/sys/shm.h
  98. 2 0
      utils/fake_libc_include/sys/socket.h
  99. 2 0
      utils/fake_libc_include/sys/stat.h
  100. 0 0
      utils/fake_libc_include/sys/statvfs.h

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+*.pyc
+*/**/*.pyc

+ 116 - 0
cjson.py

@@ -0,0 +1,116 @@
+from __future__ import print_function
+
+import sys
+import os
+sys.path.extend(['.', '..'])
+from pycparser import parse_file, c_ast
+
+from Queue import Queue
+from threading import Thread
+
+import files
+
+class Worker (Thread):
+    """Thread executing tasks from a given tasks queue"""
+    def __init__ (self, tasks):
+        Thread.__init__(self)
+        self.tasks = tasks
+        self.daemon = True
+        self.start()
+    
+    def run (self):
+        while True:
+            func, args, kargs = self.tasks.get()
+            try: func(*args, **kargs)
+            except Exception as e:
+                print(e)
+            self.tasks.task_done()
+
+class ThreadPool:
+    """Pool of threads consuming tasks from a queue"""
+    def __init__ (self, num_threads):
+        self.tasks = Queue(num_threads)
+        for _ in range(num_threads): Worker(self.tasks)
+
+    def add_task (self, func, *args, **kargs):
+        """Add a task to the queue"""
+        self.tasks.put((func, args, kargs))
+
+    def wait_completion (self):
+        """Wait for completion of all the tasks in the queue"""
+        self.tasks.join()
+
+def processFile (filename):
+    ast = parse_file(filename, use_cpp=True,
+        cpp_path='gcc',
+        cpp_args=['-E', r'-Iutils/fake_libc_include'])
+    funcDefList = [node for (_, node) in ast.children() if node.__class__.__name__ is 'FuncDef' or node.__class__.__name__ is 'Def']
+    print("> AST size: %d" % len(funcDefList))
+
+def processStudentData (studentData, assignment):
+    print("Processing data from student %s at assignment %s" %(studentData[0], assignment))
+    try:
+        processFile(studentData[1])
+    except:
+        print("> failed to process file: %s" % studentData[1])
+
+def loadStudentsFolders (raiz, folder):
+    userDataPath = os.path.join(raiz, folder)
+    return files.filesFromFolder(userDataPath, "usersdata")
+
+def loadStudentFiles (raiz, folder, studentsFolders):
+    studentsData = []
+    for s in studentsFolders:
+        path = os.path.join(raiz, folder, "usersdata", s)
+        finalFolder = files.highestFileName(path)
+        cFileFolder = os.path.join(path, finalFolder, "submittedfiles")
+        cFiles = files.getFilesInFolder(cFileFolder, "*[cC]*")
+        if len(cFiles) == 0:
+            studentsData.append((s, ""))
+        else:
+            studentsData.append((s, cFiles[0]))
+    return studentsData
+
+def loadAssignments (raiz):
+    assignmentsFolders = files.filesFromFolder(raiz, "")
+    assignments = {}
+    for a in assignmentsFolders:
+        studentsFolders = loadStudentsFolders(raiz, a)
+        if(len(studentsFolders) == 0):
+            assignments[a] = []
+            continue
+        studentsData = loadStudentFiles(raiz, a, studentsFolders)
+        assignments[a] = studentsData
+    return assignments
+
+
+#--- run ---#
+if __name__ == "__main__":
+    if len(sys.argv) > 1:
+        raiz = "./" + sys.argv[1]
+        data = loadAssignments(raiz)
+        pool = ThreadPool(10)
+        for a in data:
+            for studentData in data[a]:
+                pool.add_task(processStudentData, studentData, a)
+        pool.wait_completion()
+        print("waiting")
+        # assigments = files.filesFromFolder(raiz, "")
+        # for a in assigments:
+        #     userDataPath = os.path.join(raiz, a)
+        #     students = files.filesFromFolder(userDataPath, "usersdata")
+        #     if len(students) == 0:
+        #         continue
+        #     for s in students:
+        #         path = os.path.join(userDataPath, "usersdata", s)
+        #         finalFolder = files.highestFileName(path)
+        #         cFileFolder = os.path.join(path, finalFolder, "submittedfiles")
+        #         cFiles = files.getFilesInFolder(cFileFolder, "*.c")
+        #         for i in cFiles:
+        #             print(i)  
+        # pool = ThreadPool(20)
+        # for file in inputs:
+        #     pool.add_task(processFile, file)
+        # pool.wait_completion()
+    else:
+        print("No filename")

+ 30 - 0
files.py

@@ -0,0 +1,30 @@
+from __future__ import print_function
+
+import os
+import glob
+
+def sortAscAsInt (aList):
+  return sorted([f for f in aList if filterNames(f)], key=int)
+
+def filterNames (name):
+  try:
+    int(name)
+    return True
+  except:
+    return False
+
+def filesFromFolder (path, foldername):
+  try:
+    fullPath = os.path.join(path, foldername)
+    contentList = os.listdir(fullPath)
+    return [s for s in sortAscAsInt(contentList) if os.path.isdir(os.path.join(fullPath, s))]
+  except:
+    print("Directory %s not found at %s." % (foldername, path))
+    return []
+
+def highestFileName (path, foldername = ""):
+  files = filesFromFolder(path, foldername)
+  return max(files, key=int)
+
+def getFilesInFolder (folder, pattern):
+  return glob.glob(folder + "/" + pattern)

+ 4 - 0
utils/fake_libc_include/X11/Intrinsic.h

@@ -0,0 +1,4 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"
+#include "_X11_fake_defines.h"
+#include "_X11_fake_typedefs.h"

+ 4 - 0
utils/fake_libc_include/X11/Xlib.h

@@ -0,0 +1,4 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"
+#include "_X11_fake_defines.h"
+#include "_X11_fake_typedefs.h"

+ 16 - 0
utils/fake_libc_include/X11/_X11_fake_defines.h

@@ -0,0 +1,16 @@
+#ifndef _X11_FAKE_DEFINES_H
+#define _X11_FAKE_DEFINES_H
+
+#define Atom CARD32
+#define Bool int
+#define KeySym CARD32
+#define Pixmap CARD32
+#define Time CARD32
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#define _Xconst const
+
+#define _X_RESTRICT_KYWD
+#define Cardinal unsigned int
+#define Boolean int
+#endif

+ 38 - 0
utils/fake_libc_include/X11/_X11_fake_typedefs.h

@@ -0,0 +1,38 @@
+#ifndef _X11_FAKE_TYPEDEFS_H
+#define _X11_FAKE_TYPEDEFS_H
+
+typedef char* XPointer;
+typedef unsigned char KeyCode;
+typedef unsigned int  CARD32;
+typedef unsigned long VisualID;
+typedef unsigned long XIMResetState;
+typedef unsigned long XID;
+typedef XID Window;
+typedef XID Colormap;
+typedef XID Cursor;
+typedef XID Drawable;
+typedef void* XtPointer;
+typedef XtPointer XtRequestId;
+typedef struct Display Display;
+typedef struct Screen Screen;
+typedef struct Status Status;
+typedef struct Visual Visual;
+typedef struct Widget *Widget;
+typedef struct XColor XColor;
+typedef struct XClassHint XClassHint;
+typedef struct XEvent XEvent;
+typedef struct XFontStruct XFontStruct;
+typedef struct XGCValues XGCValues;
+typedef struct XKeyEvent XKeyEvent;
+typedef struct XKeyPressedEvent XKeyPressedEvent;
+typedef struct XPoint XPoint;
+typedef struct XRectangle XRectangle;
+typedef struct XSelectionRequestEvent XSelectionRequestEvent;
+typedef struct XWindowChanges XWindowChanges;
+typedef struct _XGC _XCG;
+typedef struct _XGC *GC;
+typedef struct _XIC *XIC;
+typedef struct _XIM *XIM;
+typedef struct _XImage XImage;
+
+#endif

+ 2 - 0
utils/fake_libc_include/_ansi.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 201 - 0
utils/fake_libc_include/_fake_defines.h

@@ -0,0 +1,201 @@
+#ifndef _FAKE_DEFINES_H
+#define _FAKE_DEFINES_H
+
+#define	NULL	0
+#define	BUFSIZ		1024
+#define	FOPEN_MAX	20
+#define	FILENAME_MAX	1024
+
+#ifndef SEEK_SET
+#define	SEEK_SET	0	/* set file offset to offset */
+#endif
+#ifndef SEEK_CUR
+#define	SEEK_CUR	1	/* set file offset to current plus offset */
+#endif
+#ifndef SEEK_END
+#define	SEEK_END	2	/* set file offset to EOF plus offset */
+#endif
+
+#define __LITTLE_ENDIAN 1234
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+#define __BIG_ENDIAN 4321
+#define BIG_ENDIAN __BIG_ENDIAN
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#define BYTE_ORDER __BYTE_ORDER
+
+#define EXIT_FAILURE 1
+#define EXIT_SUCCESS 0
+
+#define UCHAR_MAX 255
+#define USHRT_MAX 65535
+#define UINT_MAX 4294967295U
+#define RAND_MAX 32767
+#define INT_MAX 32767
+
+/* C99 inttypes.h defines */
+#define PRId8 "d"
+#define PRIi8 "i"
+#define PRIo8 "o"
+#define PRIu8 "u"
+#define PRIx8 "x"
+#define PRIX8 "X"
+#define PRId16 "d"
+#define PRIi16 "i"
+#define PRIo16 "o"
+#define PRIu16 "u"
+#define PRIx16 "x"
+#define PRIX16 "X"
+#define PRId32 "d"
+#define PRIi32 "i"
+#define PRIo32 "o"
+#define PRIu32 "u"
+#define PRIx32 "x"
+#define PRIX32 "X"
+#define PRId64 "d"
+#define PRIi64 "i"
+#define PRIo64 "o"
+#define PRIu64 "u"
+#define PRIx64 "x"
+#define PRIX64 "X"
+#define PRIdLEAST8 "d"
+#define PRIiLEAST8 "i"
+#define PRIoLEAST8 "o"
+#define PRIuLEAST8 "u"
+#define PRIxLEAST8 "x"
+#define PRIXLEAST8 "X"
+#define PRIdLEAST16 "d"
+#define PRIiLEAST16 "i"
+#define PRIoLEAST16 "o"
+#define PRIuLEAST16 "u"
+#define PRIxLEAST16 "x"
+#define PRIXLEAST16 "X"
+#define PRIdLEAST32 "d"
+#define PRIiLEAST32 "i"
+#define PRIoLEAST32 "o"
+#define PRIuLEAST32 "u"
+#define PRIxLEAST32 "x"
+#define PRIXLEAST32 "X"
+#define PRIdLEAST64 "d"
+#define PRIiLEAST64 "i"
+#define PRIoLEAST64 "o"
+#define PRIuLEAST64 "u"
+#define PRIxLEAST64 "x"
+#define PRIXLEAST64 "X"
+#define PRIdFAST8 "d"
+#define PRIiFAST8 "i"
+#define PRIoFAST8 "o"
+#define PRIuFAST8 "u"
+#define PRIxFAST8 "x"
+#define PRIXFAST8 "X"
+#define PRIdFAST16 "d"
+#define PRIiFAST16 "i"
+#define PRIoFAST16 "o"
+#define PRIuFAST16 "u"
+#define PRIxFAST16 "x"
+#define PRIXFAST16 "X"
+#define PRIdFAST32 "d"
+#define PRIiFAST32 "i"
+#define PRIoFAST32 "o"
+#define PRIuFAST32 "u"
+#define PRIxFAST32 "x"
+#define PRIXFAST32 "X"
+#define PRIdFAST64 "d"
+#define PRIiFAST64 "i"
+#define PRIoFAST64 "o"
+#define PRIuFAST64 "u"
+#define PRIxFAST64 "x"
+#define PRIXFAST64 "X"
+#define PRIdPTR "d"
+#define PRIiPTR "i"
+#define PRIoPTR "o"
+#define PRIuPTR "u"
+#define PRIxPTR "x"
+#define PRIXPTR "X"
+#define PRIdMAX "d"
+#define PRIiMAX "i"
+#define PRIoMAX "o"
+#define PRIuMAX "u"
+#define PRIxMAX "x"
+#define PRIXMAX "X"
+#define SCNd8 "d"
+#define SCNi8 "i"
+#define SCNo8 "o"
+#define SCNu8 "u"
+#define SCNx8 "x"
+#define SCNd16 "d"
+#define SCNi16 "i"
+#define SCNo16 "o"
+#define SCNu16 "u"
+#define SCNx16 "x"
+#define SCNd32 "d"
+#define SCNi32 "i"
+#define SCNo32 "o"
+#define SCNu32 "u"
+#define SCNx32 "x"
+#define SCNd64 "d"
+#define SCNi64 "i"
+#define SCNo64 "o"
+#define SCNu64 "u"
+#define SCNx64 "x"
+#define SCNdLEAST8 "d"
+#define SCNiLEAST8 "i"
+#define SCNoLEAST8 "o"
+#define SCNuLEAST8 "u"
+#define SCNxLEAST8 "x"
+#define SCNdLEAST16 "d"
+#define SCNiLEAST16 "i"
+#define SCNoLEAST16 "o"
+#define SCNuLEAST16 "u"
+#define SCNxLEAST16 "x"
+#define SCNdLEAST32 "d"
+#define SCNiLEAST32 "i"
+#define SCNoLEAST32 "o"
+#define SCNuLEAST32 "u"
+#define SCNxLEAST32 "x"
+#define SCNdLEAST64 "d"
+#define SCNiLEAST64 "i"
+#define SCNoLEAST64 "o"
+#define SCNuLEAST64 "u"
+#define SCNxLEAST64 "x"
+#define SCNdFAST8 "d"
+#define SCNiFAST8 "i"
+#define SCNoFAST8 "o"
+#define SCNuFAST8 "u"
+#define SCNxFAST8 "x"
+#define SCNdFAST16 "d"
+#define SCNiFAST16 "i"
+#define SCNoFAST16 "o"
+#define SCNuFAST16 "u"
+#define SCNxFAST16 "x"
+#define SCNdFAST32 "d"
+#define SCNiFAST32 "i"
+#define SCNoFAST32 "o"
+#define SCNuFAST32 "u"
+#define SCNxFAST32 "x"
+#define SCNdFAST64 "d"
+#define SCNiFAST64 "i"
+#define SCNoFAST64 "o"
+#define SCNuFAST64 "u"
+#define SCNxFAST64 "x"
+#define SCNdPTR "d"
+#define SCNiPTR "i"
+#define SCNoPTR "o"
+#define SCNuPTR "u"
+#define SCNxPTR "x"
+#define SCNdMAX "d"
+#define SCNiMAX "i"
+#define SCNoMAX "o"
+#define SCNuMAX "u"
+#define SCNxMAX "x"
+
+/* C99 stdbool.h defines */
+#define __bool_true_false_are_defined 1
+#define false 0
+#define true 1
+
+/* va_arg macros and type*/
+#define va_start(_ap, _type) __builtin_va_start((_ap))
+#define va_arg(_ap, _type) __builtin_va_arg((_ap))
+#define va_end(_list)
+
+#endif

+ 172 - 0
utils/fake_libc_include/_fake_typedefs.h

@@ -0,0 +1,172 @@
+#ifndef _FAKE_TYPEDEFS_H
+#define _FAKE_TYPEDEFS_H
+
+typedef int size_t;
+typedef int __builtin_va_list;
+typedef int __gnuc_va_list;
+typedef int va_list;
+typedef int __int8_t;
+typedef int __uint8_t;
+typedef int __int16_t;
+typedef int __uint16_t;
+typedef int __int_least16_t;
+typedef int __uint_least16_t;
+typedef int __int32_t;
+typedef int __uint32_t;
+typedef int __int64_t;
+typedef int __uint64_t;
+typedef int __int_least32_t;
+typedef int __uint_least32_t;
+typedef int __s8;
+typedef int __u8;
+typedef int __s16;
+typedef int __u16;
+typedef int __s32;
+typedef int __u32;
+typedef int __s64;
+typedef int __u64;
+typedef int _LOCK_T;
+typedef int _LOCK_RECURSIVE_T;
+typedef int _off_t;
+typedef int __dev_t;
+typedef int __uid_t;
+typedef int __gid_t;
+typedef int _off64_t;
+typedef int _fpos_t;
+typedef int _ssize_t;
+typedef int wint_t;
+typedef int _mbstate_t;
+typedef int _flock_t;
+typedef int _iconv_t;
+typedef int __ULong;
+typedef int __FILE;
+typedef int ptrdiff_t;
+typedef int wchar_t;
+typedef int __off_t;
+typedef int __pid_t;
+typedef int __loff_t;
+typedef int u_char;
+typedef int u_short;
+typedef int u_int;
+typedef int u_long;
+typedef int ushort;
+typedef int uint;
+typedef int clock_t;
+typedef int time_t;
+typedef int daddr_t;
+typedef int caddr_t;
+typedef int ino_t;
+typedef int off_t;
+typedef int dev_t;
+typedef int uid_t;
+typedef int gid_t;
+typedef int pid_t;
+typedef int key_t;
+typedef int ssize_t;
+typedef int mode_t;
+typedef int nlink_t;
+typedef int fd_mask;
+typedef int _types_fd_set;
+typedef int clockid_t;
+typedef int timer_t;
+typedef int useconds_t;
+typedef int suseconds_t;
+typedef int FILE;
+typedef int fpos_t;
+typedef int cookie_read_function_t;
+typedef int cookie_write_function_t;
+typedef int cookie_seek_function_t;
+typedef int cookie_close_function_t;
+typedef int cookie_io_functions_t;
+typedef int div_t;
+typedef int ldiv_t;
+typedef int lldiv_t;
+typedef int sigset_t;
+typedef int __sigset_t;
+typedef int _sig_func_ptr;
+typedef int sig_atomic_t;
+typedef int __tzrule_type;
+typedef int __tzinfo_type;
+typedef int mbstate_t;
+typedef int sem_t;
+typedef int pthread_t;
+typedef int pthread_attr_t;
+typedef int pthread_mutex_t;
+typedef int pthread_mutexattr_t;
+typedef int pthread_cond_t;
+typedef int pthread_condattr_t;
+typedef int pthread_key_t;
+typedef int pthread_once_t;
+typedef int pthread_rwlock_t;
+typedef int pthread_rwlockattr_t;
+typedef int pthread_spinlock_t;
+typedef int pthread_barrier_t;
+typedef int pthread_barrierattr_t;
+typedef int jmp_buf;
+typedef int rlim_t;
+typedef int sa_family_t;
+typedef int sigjmp_buf;
+typedef int stack_t;
+typedef int siginfo_t;
+typedef int z_stream;
+
+/* C99 exact-width integer types */
+typedef int int8_t;
+typedef int uint8_t;
+typedef int int16_t;
+typedef int uint16_t;
+typedef int int32_t;
+typedef int uint32_t;
+typedef int int64_t;
+typedef int uint64_t;
+
+/* C99 minimum-width integer types */
+typedef int int_least8_t;
+typedef int uint_least8_t;
+typedef int int_least16_t;
+typedef int uint_least16_t;
+typedef int int_least32_t;
+typedef int uint_least32_t;
+typedef int int_least64_t;
+typedef int uint_least64_t;
+
+/* C99 fastest minimum-width integer types */
+typedef int int_fast8_t;
+typedef int uint_fast8_t;
+typedef int int_fast16_t;
+typedef int uint_fast16_t;
+typedef int int_fast32_t;
+typedef int uint_fast32_t;
+typedef int int_fast64_t;
+typedef int uint_fast64_t;
+
+/* C99 integer types capable of holding object pointers */
+typedef int intptr_t;
+typedef int uintptr_t;
+
+/* C99 greatest-width integer types */
+typedef int intmax_t;
+typedef int uintmax_t;
+
+/* C99 stdbool.h bool type. _Bool is built-in in C99 */
+typedef _Bool bool;
+
+/* Mir typedefs */
+typedef void* MirEGLNativeWindowType;
+typedef void* MirEGLNativeDisplayType;
+typedef struct MirConnection MirConnection;
+typedef struct MirSurface MirSurface;
+typedef struct MirSurfaceSpec MirSurfaceSpec;
+typedef struct MirScreencast MirScreencast;
+typedef struct MirPromptSession MirPromptSession;
+typedef struct MirBufferStream MirBufferStream;
+typedef struct MirPersistentId MirPersistentId;
+typedef struct MirBlob MirBlob;
+typedef struct MirDisplayConfig MirDisplayConfig;
+
+/* xcb typedefs */
+typedef struct xcb_connection_t xcb_connection_t;
+typedef uint32_t xcb_window_t;
+typedef uint32_t xcb_visualid_t;
+
+#endif

+ 2 - 0
utils/fake_libc_include/_syslist.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/aio.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/alloca.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/ar.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/argz.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/arpa/inet.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/asm-generic/int-ll64.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/assert.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/complex.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/cpio.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/ctype.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/dirent.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/dlfcn.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/endian.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/envz.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/errno.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/fastmath.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/fcntl.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/features.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/fenv.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/float.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/fmtmsg.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/fnmatch.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/ftw.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/getopt.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/glob.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/grp.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/iconv.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/ieeefp.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/inttypes.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/iso646.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/langinfo.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/libgen.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/libintl.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/limits.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/linux/socket.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/linux/version.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/locale.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/malloc.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/math.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/mir_toolkit/client_types.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/monetary.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/mqueue.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/ndbm.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/net/if.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/netdb.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/netinet/in.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/netinet/tcp.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/newlib.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/nl_types.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/openssl/err.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/openssl/evp.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/openssl/hmac.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/openssl/ssl.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/openssl/x509v3.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/paths.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/poll.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/process.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/pthread.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/pwd.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/reent.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/regdef.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/regex.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sched.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/search.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/semaphore.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/setjmp.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/signal.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/spawn.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/stdarg.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/stdbool.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/stddef.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/stdint.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/stdio.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/stdlib.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/string.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/strings.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/stropts.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/ioctl.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/ipc.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/mman.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/msg.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/poll.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/resource.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/select.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/sem.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/shm.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/socket.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 2 - 0
utils/fake_libc_include/sys/stat.h

@@ -0,0 +1,2 @@
+#include "_fake_defines.h"
+#include "_fake_typedefs.h"

+ 0 - 0
utils/fake_libc_include/sys/statvfs.h


Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio