Check-in [4ce6697da8]
Overview
Comment:Fixed bugs related to not using C11 atomics
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4ce6697da85123a2a784497a43ab2a77fa915512
User & Date: rkeene on 2016-03-03 04:21:31
Other Links: manifest | tags
Context
2016-05-20
15:52
Added a simple way to pass additional CFLAGS/LDFLAGS/LIBS check-in: 6d0a708452 user: rkeene tags: trunk
2016-03-03
04:21
Fixed bugs related to not using C11 atomics check-in: 4ce6697da8 user: rkeene tags: trunk
2016-02-23
05:24
Added a troubleshooting section to the README about C11 atomics and broken versions of gcc check-in: afddda9b5d user: rkeene tags: trunk
Changes

Modified Makefile from [5a0201dfad] to [debc382dde].

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

|







1
2
3
4
5
6
7
8
9
CC = gcc
CFLAGS = -std=gnu11 -Wall -Werror -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 [ce75275d14] to [07cd352593].

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#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







<







53
54
55
56
57
58
59

60
61
62
63
64
65
66
#endif

/*
 * If the C compiler does not support C11 atomics, disable TIMEOUT support
 * since it relies upon it
 */
#ifndef FILED_FEATURE_C11_ATOMICS

#  define FILED_DONT_TIMEOUT 1
#endif

/*
 * These headers are only required for TIMEOUT support
 */
#ifndef FILED_DONT_TIMEOUT
613
614
615
616
617
618
619

620
621
622
623
624
625
626

	return(0);
}
#endif

#ifdef FILED_DONT_TIMEOUT
#define filed_sockettimeout_thread_init() 0

#define filed_sockettimeout_accept(x) /**/
#define filed_sockettimeout_processing_start(x) /**/
#define filed_sockettimeout_processing_end(x) /**/
#define filed_sockettimeout_close(x) /**/
#else
_Atomic time_t filed_sockettimeout_time;
struct {







>







612
613
614
615
616
617
618
619
620
621
622
623
624
625
626

	return(0);
}
#endif

#ifdef FILED_DONT_TIMEOUT
#define filed_sockettimeout_thread_init() 0
#define filed_sockettimeout_init() 0
#define filed_sockettimeout_accept(x) /**/
#define filed_sockettimeout_processing_start(x) /**/
#define filed_sockettimeout_processing_end(x) /**/
#define filed_sockettimeout_close(x) /**/
#else
_Atomic time_t filed_sockettimeout_time;
struct {