Mercurial > hg > nginx-ranges
comparison src/os/unix/ngx_channel.c @ 635:e67b227c8dbb default tip
Merge with current.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:07:55 +0400 |
parents | 53f5f04a64b8 |
children |
comparison
equal
deleted
inserted
replaced
578:f3a9e57d2e17 | 635:e67b227c8dbb |
---|---|
42 * *(int *) CMSG_DATA(&cmsg.cm) = ch->fd; | 42 * *(int *) CMSG_DATA(&cmsg.cm) = ch->fd; |
43 * because some gcc 4.4 with -O2/3/s optimization issues the warning: | 43 * because some gcc 4.4 with -O2/3/s optimization issues the warning: |
44 * dereferencing type-punned pointer will break strict-aliasing rules | 44 * dereferencing type-punned pointer will break strict-aliasing rules |
45 * | 45 * |
46 * Fortunately, gcc with -O1 compiles this ngx_memcpy() | 46 * Fortunately, gcc with -O1 compiles this ngx_memcpy() |
47 * in the same simple assigment as in the code above | 47 * in the same simple assignment as in the code above |
48 */ | 48 */ |
49 | 49 |
50 ngx_memcpy(CMSG_DATA(&cmsg.cm), &ch->fd, sizeof(int)); | 50 ngx_memcpy(CMSG_DATA(&cmsg.cm), &ch->fd, sizeof(int)); |
51 } | 51 } |
52 | 52 |