diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-01-21 18:38:49 -0800 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-01-21 18:38:49 -0800 |
commit | 0fd2f830882402979a83010e89650e7245960d39 (patch) | |
tree | 0968ca9424c5fb2433047519cbd54d3dd8d0b863 /bindings/linux | |
parent | ce9bba3cb5409844f8f3d7dcc235a9ea30cad090 (diff) |
Sync to internal Google development.
Diffstat (limited to 'bindings/linux')
-rw-r--r-- | bindings/linux/Makefile | 20 | ||||
-rw-r--r-- | bindings/linux/assert.h | 20 | ||||
-rw-r--r-- | bindings/linux/errno.h | 8 | ||||
-rw-r--r-- | bindings/linux/stdint.h | 8 | ||||
-rw-r--r-- | bindings/linux/stdio.h | 10 | ||||
-rw-r--r-- | bindings/linux/stdlib.h | 22 | ||||
-rw-r--r-- | bindings/linux/string.h | 13 |
7 files changed, 0 insertions, 101 deletions
diff --git a/bindings/linux/Makefile b/bindings/linux/Makefile deleted file mode 100644 index 1736b61..0000000 --- a/bindings/linux/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -obj-m = upb.o - -upb-objs = \ - ../../upb/upb.o \ - ../../upb/bytestream.o \ - ../../upb/def.o \ - ../../upb/handlers.o \ - ../../upb/table.o \ - ../../upb/refcount.o \ - ../../upb/msg.o \ - -KVERSION = $(shell uname -r) - -ccflags-y := -I$(PWD) -I$(PWD)/../.. -Wno-declaration-after-statement -std=gnu99 - -all: - make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules - -clean: - make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean diff --git a/bindings/linux/assert.h b/bindings/linux/assert.h deleted file mode 100644 index 26d8ab6..0000000 --- a/bindings/linux/assert.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * upb - a minimalist implementation of protocol buffers. - * - * Copyright (c) 2012 Google Inc. See LICENSE for details. - * Author: Josh Haberman <jhaberman@gmail.com> - */ - -#include <linux/kernel.h> - -#ifndef UPB_LINUX_ASSERT_H -#define UPB_LINUX_ASSERT_H - -#ifdef NDEBUG -#define assert(x) -#else -#define assert(x) \ - if (!(x)) panic("Assertion failed: %s at %s:%d", #x, __FILE__, __LINE__); -#endif - -#endif diff --git a/bindings/linux/errno.h b/bindings/linux/errno.h deleted file mode 100644 index f45d939..0000000 --- a/bindings/linux/errno.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * upb - a minimalist implementation of protocol buffers. - * - * Copyright (c) 2012 Google Inc. See LICENSE for details. - * Author: Josh Haberman <jhaberman@gmail.com> - */ - -#include <linux/errno.h> diff --git a/bindings/linux/stdint.h b/bindings/linux/stdint.h deleted file mode 100644 index 2524b23..0000000 --- a/bindings/linux/stdint.h +++ /dev/null @@ -1,8 +0,0 @@ -/* - * upb - a minimalist implementation of protocol buffers. - * - * Copyright (c) 2012 Google Inc. See LICENSE for details. - * Author: Josh Haberman <jhaberman@gmail.com> - */ - -#include <linux/types.h> diff --git a/bindings/linux/stdio.h b/bindings/linux/stdio.h deleted file mode 100644 index 72c1b0d..0000000 --- a/bindings/linux/stdio.h +++ /dev/null @@ -1,10 +0,0 @@ -/* - * upb - a minimalist implementation of protocol buffers. - * - * Copyright (c) 2012 Google Inc. See LICENSE for details. - * Author: Josh Haberman <jhaberman@gmail.com> - * - * Linux-kernel implementations of some stdlib.h functions. - */ - -#include <linux/kernel.h> // For sprintf and friends. diff --git a/bindings/linux/stdlib.h b/bindings/linux/stdlib.h deleted file mode 100644 index 8381b13..0000000 --- a/bindings/linux/stdlib.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * upb - a minimalist implementation of protocol buffers. - * - * Copyright (c) 2012 Google Inc. See LICENSE for details. - * Author: Josh Haberman <jhaberman@gmail.com> - * - * Linux-kernel implementations of some stdlib.h functions. - */ - -#include <linux/slab.h> - -#ifndef UPB_LINUX_STDLIB_H -#define UPB_LINUX_STDLIB_H - -static inline void *malloc(size_t size) { return kmalloc(size, GFP_ATOMIC); } -static inline void free(void *p) { kfree(p); } - -static inline void *realloc(void *p, size_t size) { - return krealloc(p, size, GFP_ATOMIC); -} - -#endif diff --git a/bindings/linux/string.h b/bindings/linux/string.h deleted file mode 100644 index 30ebf8a..0000000 --- a/bindings/linux/string.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * upb - a minimalist implementation of protocol buffers. - * - * Copyright (c) 2012 Google Inc. See LICENSE for details. - * Author: Josh Haberman <jhaberman@gmail.com> - */ - -#ifndef UPB_LINUX_STRING_H_ -#define UPB_LINUX_STRING_H_ - -#include <linux/string.h> - -#endif /* UPB_DEF_H_ */ |