1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/nsprpub/pr/src/md/unix/aixwrap.c Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/* 1.10 + * File: aixwrap.c 1.11 + * Description: 1.12 + * This file contains a single function, _MD_SELECT(), which simply 1.13 + * invokes the select() function. This file is used in an ugly 1.14 + * hack to override the system select() function on AIX releases 1.15 + * prior to 4.2. (On AIX 4.2, we use a different mechanism to 1.16 + * override select().) 1.17 + */ 1.18 + 1.19 +#ifndef AIX_RENAME_SELECT 1.20 +#error aixwrap.c should only be used on AIX 3.2 or 4.1 1.21 +#else 1.22 + 1.23 +#include <sys/select.h> 1.24 +#include <sys/poll.h> 1.25 + 1.26 +int _MD_SELECT(int width, fd_set *r, fd_set *w, fd_set *e, struct timeval *t) 1.27 +{ 1.28 + return select(width, r, w, e, t); 1.29 +} 1.30 + 1.31 +int _MD_POLL(void *listptr, unsigned long nfds, long timeout) 1.32 +{ 1.33 + return poll(listptr, nfds, timeout); 1.34 +} 1.35 + 1.36 +#endif /* AIX_RENAME_SELECT */