Changeset b8e72fd1 in mainline for uspace/lib/c
- Timestamp:
- 2013-05-30T17:13:02Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 98abd40
- Parents:
- be2bb4f (diff), 94dfb92 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- uspace/lib/c
- Files:
-
- 5 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/Makefile
rbe2bb4f rb8e72fd1 75 75 generic/device/pci.c \ 76 76 generic/device/ahci.c \ 77 generic/dnsr.c \ 77 78 generic/dlfcn.c \ 78 79 generic/elf/elf_load.c \ … … 92 93 generic/task.c \ 93 94 generic/futex.c \ 95 generic/inet/addr.c \ 94 96 generic/inet.c \ 95 97 generic/inetcfg.c \ … … 162 164 163 165 $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 164 $( GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@166 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -E -x c $< | grep -v "^\#" > $@ 165 167 166 168 $(LIBC_PREFIX)/arch/$(UARCH)/_link-loader.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 167 $( GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@169 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DLOADER -E -x c $< | grep -v "^\#" > $@ 168 170 169 171 $(LIBC_PREFIX)/arch/$(UARCH)/_link-shlib.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 170 $( GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@172 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DSHLIB -E -x c $< | grep -v "^\#" > $@ 171 173 172 174 $(LIBC_PREFIX)/arch/$(UARCH)/_link-dlexe.ld: $(LIBC_PREFIX)/arch/$(UARCH)/_link.ld.in 173 $( GCC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@175 $(CC) $(DEFS) $(CFLAGS) -DLIBC_PATH=$(CURDIR) -DDLEXE -E -x c $< | grep -v "^\#" > $@ 174 176 175 177 $(COMMON_HEADER_ARCH): $(COMMON_HEADER) -
uspace/lib/c/arch/amd64/Makefile.common
rbe2bb4f rb8e72fd1 28 28 29 29 CLANG_ARCH = x86_64 30 CLANG_TARGET = x86_64-unknown-linux 30 31 GCC_CFLAGS += -fno-omit-frame-pointer 32 CLANG_CFLAGS += -fno-omit-frame-pointer 31 33 32 34 ENDIANESS = LE -
uspace/lib/c/arch/ia32/Makefile.common
rbe2bb4f rb8e72fd1 28 28 29 29 CLANG_ARCH = i386 30 CLANG_TARGET = i386-unknown-linux 30 31 31 32 ifeq ($(PROCESSOR),i486) … … 34 35 GCC_CFLAGS += -march=pentium -fno-omit-frame-pointer 35 36 endif 37 CLANG_CFLAGS += -fno-omit-frame-pointer 36 38 37 39 ENDIANESS = LE -
uspace/lib/c/generic/device/hw_res_parsed.c
rbe2bb4f rb8e72fd1 188 188 hw_resource_list_t hw_resources; 189 189 hw_res_list_parsed_clean(hw_res_parsed); 190 bzero(&hw_resources, sizeof(hw_resource_list_t));190 memset(&hw_resources, 0, sizeof(hw_resource_list_t)); 191 191 192 192 int rc = hw_res_get_resource_list(sess, &hw_resources); -
uspace/lib/c/generic/mem.c
rbe2bb4f rb8e72fd1 224 224 * @param s1 Pointer to the first area to compare. 225 225 * @param s2 Pointer to the second area to compare. 226 * @param len Size of the first area in bytes. Both areas must have227 * the same length.228 * 229 * @return If len is 0, return zero. If the areas match, return230 * zero. Otherwise return non-zero.231 * 232 */ 233 int bcmp(const void *s1, const void *s2, size_t len)226 * @param len Size of the areas in bytes. 227 * 228 * @return Zero if areas have the same contents. If they differ, 229 * the sign of the result is the same as the sign of the 230 * difference of the first pair of different bytes. 231 * 232 */ 233 int memcmp(const void *s1, const void *s2, size_t len) 234 234 { 235 235 uint8_t *u1 = (uint8_t *) s1; 236 236 uint8_t *u2 = (uint8_t *) s2; 237 238 for (; (len != 0) && (*u1++ == *u2++); len--); 239 240 return len; 237 size_t i; 238 239 for (i = 0; i < len; i++) { 240 if (*u1 != *u2) 241 return (int)(*u1) - (int)(*u2); 242 ++u1; 243 ++u2; 244 } 245 246 return 0; 241 247 } 242 248 -
uspace/lib/c/generic/net/inet.c
rbe2bb4f rb8e72fd1 144 144 /* Erase if no address */ 145 145 if (!address) { 146 bzero(data, count);146 memset(data, 0, count); 147 147 return ENOENT; 148 148 } … … 181 181 } else { 182 182 /* Erase the rest of the address */ 183 bzero(data + index, count - index);183 memset(data + index, 0, count - index); 184 184 return EOK; 185 185 } -
uspace/lib/c/generic/net/socket_client.c
rbe2bb4f rb8e72fd1 446 446 return ENOMEM; 447 447 448 bzero(socket, sizeof(*socket));448 memset(socket, 0, sizeof(*socket)); 449 449 fibril_rwlock_write_lock(&socket_globals.lock); 450 450 … … 657 657 return ENOMEM; 658 658 } 659 bzero(new_socket, sizeof(*new_socket));659 memset(new_socket, 0, sizeof(*new_socket)); 660 660 socket_id = socket_generate_new_id(); 661 661 if (socket_id <= 0) { -
uspace/lib/c/include/device/hw_res_parsed.h
rbe2bb4f rb8e72fd1 127 127 free(list->dma_channels.channels); 128 128 129 bzero(list, sizeof(hw_res_list_parsed_t));129 memset(list, 0, sizeof(hw_res_list_parsed_t)); 130 130 } 131 131 … … 136 136 static inline void hw_res_list_parsed_init(hw_res_list_parsed_t *list) 137 137 { 138 bzero(list, sizeof(hw_res_list_parsed_t));138 memset(list, 0, sizeof(hw_res_list_parsed_t)); 139 139 } 140 140 -
uspace/lib/c/include/inet/inet.h
rbe2bb4f rb8e72fd1 36 36 #define LIBC_INET_INET_H_ 37 37 38 #include <inet/addr.h> 38 39 #include <sys/types.h> 39 40 40 41 #define INET_TTL_MAX 255 41 42 typedef struct {43 uint32_t ipv4;44 } inet_addr_t;45 42 46 43 typedef struct { -
uspace/lib/c/include/inet/inetcfg.h
rbe2bb4f rb8e72fd1 38 38 #include <inet/inet.h> 39 39 #include <sys/types.h> 40 41 /** Network address */42 typedef struct {43 /** Address */44 uint32_t ipv4;45 /** Number of valid bits in @c ipv4 */46 int bits;47 } inet_naddr_t;48 40 49 41 /** Address object info */ -
uspace/lib/c/include/io/verify.h
rbe2bb4f rb8e72fd1 38 38 #ifndef NVERIFY_PRINTF 39 39 40 #ifdef __clang__ 41 #define PRINTF_ATTRIBUTE(start, end) \ 42 __attribute__((format(__printf__, start, end))) 43 #else 40 44 #define PRINTF_ATTRIBUTE(start, end) \ 41 45 __attribute__((format(gnu_printf, start, end))) 46 #endif 42 47 43 48 #else /* NVERIFY_PRINTF */ -
uspace/lib/c/include/ipc/services.h
rbe2bb4f rb8e72fd1 53 53 } services_t; 54 54 55 #define SERVICE_NAME_DNSR "net/dnsr" 55 56 #define SERVICE_NAME_INET "net/inet" 56 57 #define SERVICE_NAME_INETCFG "net/inetcfg" -
uspace/lib/c/include/mem.h
rbe2bb4f rb8e72fd1 38 38 #include <sys/types.h> 39 39 40 #define bzero(ptr, len) memset((ptr), 0, (len))41 42 40 extern void *memset(void *, int, size_t) 43 41 __attribute__ ((optimize("-fno-tree-loop-distribute-patterns"))); … … 45 43 __attribute__ ((optimize("-fno-tree-loop-distribute-patterns"))); 46 44 extern void *memmove(void *, const void *, size_t); 47 48 extern int bcmp(const void *, const void *, size_t); 45 extern int memcmp(const void *, const void *, size_t); 49 46 50 47 #endif
Note:
See TracChangeset
for help on using the changeset viewer.