Overview
Comment: | Added support for checking for a working C11 atomic compiler (unfortunately, GCC 4.7.x and 4.8.x are still broken due to compiler bugs) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8f0a3ed18a992f8644dc2195d523567a |
User & Date: | rkeene on 2016-02-22 22:07:06 |
Other Links: | manifest | tags |
Context
2016-02-22
| ||
22:08 | Updated ignore for generated file check-in: 62bbe8a973 user: rkeene tags: trunk | |
22:07 | Added support for checking for a working C11 atomic compiler (unfortunately, GCC 4.7.x and 4.8.x are still broken due to compiler bugs) check-in: 8f0a3ed18a user: rkeene tags: trunk | |
21:02 | Completed support for killing idle connections check-in: 6e6baf524b user: rkeene tags: trunk | |
Changes
Modified Makefile from [debc382dde] to [5a0201dfad].
1 | CC = gcc | | | 1 2 3 4 5 6 7 8 9 | CC = gcc CFLAGS = -std=gnu11 -Wall -Werror -Wno-error=cpp -W -pthread -O3 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE LDFLAGS = -pthread LIBS = -lpthread MIMETYPES = /etc/httpd/mime.types PREFIX = /usr/local prefix = $(PREFIX) bindir = $(prefix)/bin |
︙ | ︙ |
Modified filed.c from [59492d048f] to [877b095562].
︙ | ︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #include <stdarg.h> #include <fcntl.h> #include <stdio.h> #include <errno.h> #include <time.h> #include <pwd.h> #ifndef FILED_DONT_TIMEOUT #include <stdatomic.h> #include <stdbool.h> #endif /* Compile time constants */ #define FILED_VERSION "1.13" | > > > > > > > > > > > > > > > > > > > > > | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #include <stdarg.h> #include <fcntl.h> #include <stdio.h> #include <errno.h> #include <time.h> #include <pwd.h> /* * Determine if the C compiler supports C11 atomics */ #if __STDC_VERSION__ >= 201112L # ifndef __STDC_NO_ATOMICS__ # define FILED_FEATURE_C11_ATOMICS 1 # endif #endif /* * If the C compiler does not support C11 atomics, disable TIMEOUT support * since it relies upon it */ #ifndef FILED_FEATURE_C11_ATOMICS # warning "Automatically defining FILED_DONT_TIMEOUT since your C compiler lacks C11 atomics" # define FILED_DONT_TIMEOUT 1 #endif /* * These headers are only required for TIMEOUT support */ #ifndef FILED_DONT_TIMEOUT #include <stdatomic.h> #include <stdbool.h> #endif /* Compile time constants */ #define FILED_VERSION "1.13" |
︙ | ︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 | #define BIND_ADDR "::" #define CACHE_SIZE 8209 #define LOG_FILE "-" /* Fuzzing Test Code */ #ifdef FILED_TEST_AFL #define FILED_DONT_LOG 1 #define pthread_create(a, x, y, z) afl_pthread_create(a, x, y, z) #define bind(x, y, z) afl_bind(x, y, z) #define socket(x, y, z) 8193 #define listen(x, y) 0 #define accept(x, y, z) afl_accept(x, y, z) #define close(x) { if (strcmp(#x, "random_fd") == 0) { close(x); } else { exit(0); } } #define fclose(x) exit(0) | > | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | #define BIND_ADDR "::" #define CACHE_SIZE 8209 #define LOG_FILE "-" /* Fuzzing Test Code */ #ifdef FILED_TEST_AFL #define FILED_DONT_LOG 1 #define FILED_DONT_TIMEOUT 1 #define pthread_create(a, x, y, z) afl_pthread_create(a, x, y, z) #define bind(x, y, z) afl_bind(x, y, z) #define socket(x, y, z) 8193 #define listen(x, y) 0 #define accept(x, y, z) afl_accept(x, y, z) #define close(x) { if (strcmp(#x, "random_fd") == 0) { close(x); } else { exit(0); } } #define fclose(x) exit(0) |
︙ | ︙ |