Mercurial > ecos
changeset 3289:5d16532287ee
* include/sys/select.h: Make select FD_COPY and FD_ZERO macros single
statements. [ Bugzilla 1001986 ]
author | jld |
---|---|
date | Mon, 16 Jun 2014 10:03:58 +0000 |
parents | 8dd9eb5508ca |
children | a1df75458e13 |
files | packages/isoinfra/current/ChangeLog packages/isoinfra/current/include/sys/select.h |
diffstat | 2 files changed, 11 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/isoinfra/current/ChangeLog +++ b/packages/isoinfra/current/ChangeLog @@ -1,3 +1,8 @@ +2014-05-15 Andy Jackson <andy@xylanta.com> + + * include/sys/select.h: Make select FD_COPY and FD_ZERO macros single + statements. [ Bugzilla 1001986 ] + 2012-03-09 Jonathan Larmour <jifl@eCosCentric.com> * include/time.h: Add suseconds_t and useconds_t here for now. @@ -438,7 +443,7 @@ 2000-05-02 Jonathan Larmour <jlarmour@ // ####GPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2014 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by
--- a/packages/isoinfra/current/include/sys/select.h +++ b/packages/isoinfra/current/include/sys/select.h @@ -8,7 +8,7 @@ // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2014 Free Software Foundation, Inc. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -102,19 +102,17 @@ typedef struct fd_set { #define FD_CLR(__n, __p) ((__p)->fds_bits[(__n)/__NFDBITS] &= ~(1 << ((__n) % __NFDBITS))) #define FD_ISSET(__n, __p) ((__p)->fds_bits[(__n)/__NFDBITS] & (1 << ((__n) % __NFDBITS))) -#define FD_COPY(__f, __t) \ -{ \ +#define FD_COPY(__f, __t) CYG_MACRO_START \ unsigned int _i; \ for( _i = 0; _i < __howmany(FD_SETSIZE, __NFDBITS) ; _i++ ) \ (__t)->fds_bits[_i] = (__f)->fds_bits[_i]; \ -} +CYG_MACRO_END -#define FD_ZERO(__p) \ -{ \ +#define FD_ZERO(__p) CYG_MACRO_START \ unsigned int _i; \ for( _i = 0; _i < __howmany(FD_SETSIZE, __NFDBITS) ; _i++ ) \ (__p)->fds_bits[_i] = 0; \ -} +CYG_MACRO_END # endif /* CYGONCE_ISO_SYS_SELECT_FD_SETS */