Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: remove __read_mostly macro
Browse files Browse the repository at this point in the history
It creates trouble with llvm-gcc on OS X.
  • Loading branch information
saghul authored and bnoordhuis committed Sep 12, 2012
1 parent f8e7513 commit b7047d6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/unix/core.c
Expand Up @@ -463,7 +463,7 @@ int uv__accept(int sockfd) {

while (1) {
#if __linux__
static __read_mostly int no_accept4;
static int no_accept4;

if (no_accept4)
goto skip;
Expand Down
7 changes: 2 additions & 5 deletions src/unix/internal.h
Expand Up @@ -28,11 +28,8 @@
#include <assert.h>
#include <stdlib.h> /* abort */

#if defined(__GNUC__)
# define __read_mostly __attribute__((__section__(".data.read_mostly")))
#else
# define __attribute__(v)
# define __read_mostly
#if defined(__STRICT_ANSI__)
# define inline __inline
#endif

#undef HAVE_FUTIMES
Expand Down
4 changes: 2 additions & 2 deletions src/unix/process.c
Expand Up @@ -117,7 +117,7 @@ static void uv__chld(uv_signal_t* handle, int signum) {

int uv__make_socketpair(int fds[2], int flags) {
#if __linux__
static __read_mostly int no_cloexec;
static int no_cloexec;

if (no_cloexec)
goto skip;
Expand Down Expand Up @@ -153,7 +153,7 @@ int uv__make_socketpair(int fds[2], int flags) {

int uv__make_pipe(int fds[2], int flags) {
#if __linux__
static __read_mostly int no_pipe2;
static int no_pipe2;

if (no_pipe2)
goto skip;
Expand Down
2 changes: 1 addition & 1 deletion src/unix/stream.c
Expand Up @@ -440,7 +440,7 @@ static int uv__emfile_trick(uv_loop_t* loop, int accept_fd) {


void uv__server_io(uv_loop_t* loop, uv__io_t* w, int events) {
static __read_mostly int use_emfile_trick = -1;
static int use_emfile_trick = -1;
uv_stream_t* stream;
int fd;
int r;
Expand Down

0 comments on commit b7047d6

Please sign in to comment.