1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-08-13 09:36:46 +00:00
Files
build
clients
cmake_modules
conf
debian
docs
dtd
freeswitch.xcodeproj
fscomm
htdocs
libs
apr
apr-util
broadvoice
curl
esl
freetdm
iksemel
ilbc
js
nsprpub
admin
build
config
include
lib
macbuild
pkg
pr
include
src
tests
dll
macbuild
w16gui
.cvsignore
Makefile.in
README.TXT
accept.c
acceptread.c
acceptreademu.c
addrstr.c
affinity.c
alarm.c
anonfm.c
append.c
atomic.c
attach.c
bigfile.c
bigfile2.c
bigfile3.c
bug1test.c
cleanup.c
cltsrv.c
concur.c
cvar.c
cvar2.c
dbmalloc.c
dbmalloc1.c
dceemu.c
depend.c
dlltest.c
dtoa.c
env.c
errcodes.c
errset.c
exit.c
fdcach.c
fileio.c
foreign.c
forktest.c
formattm.c
freeif.c
fsync.c
getai.c
gethost.c
getproto.c
i2l.c
initclk.c
inrval.c
instrumt.c
intrio.c
intrupt.c
io_timeout.c
io_timeoutk.c
io_timeoutu.c
ioconthr.c
ipv6.c
join.c
joinkk.c
joinku.c
joinuk.c
joinuu.c
layer.c
lazyinit.c
libfilename.c
lltest.c
lock.c
lockfile.c
logger.c
makedir.c
many_cv.c
mbcs.c
multiacc.c
multiwait.c
nameshm1.c
nbconn.c
nblayer.c
nonblock.c
ntioto.c
ntoh.c
obsints.c
op_2long.c
op_excl.c
op_filnf.c
op_filok.c
op_noacc.c
op_nofil.c
openfile.c
parent.c
peek.c
perf.c
pipeping.c
pipeping2.c
pipepong.c
pipepong2.c
pipeself.c
poll_er.c
poll_nm.c
poll_to.c
pollable.c
prftest.c
prftest1.c
prftest2.c
primblok.c
priotest.c
provider.c
prpoll.c
prpollml.c
prselect.c
prttools.h
randseed.c
ranfile.c
rmdir.c
runtests.ksh
runtests.sh
runy2ktests.ksh
rwlocktest.c
sel_spd.c
selct_er.c
selct_nm.c
selct_to.c
select2.c
selintr.c
sem.c
sema.c
semaerr.c
semaerr1.c
semaping.c
semapong.c
sendzlf.c
server_test.c
servr_kk.c
servr_ku.c
servr_uk.c
servr_uu.c
short_thread.c
sigpipe.c
sleep.c
socket.c
sockopt.c
sockping.c
sockpong.c
sprintf.c
sproc_ch.c
sproc_p.c
stack.c
stat.c
stdio.c
str2addr.c
strod.c
suspend.c
switch.c
system.c
testbit.c
testfile.c
threads.c
thrpool_client.c
thrpool_server.c
thruput.c
time.c
timemac.c
timetest.c
tmoacc.c
tmocon.c
tpd.c
udpsrv.c
ut_ttools.h
vercheck.c
version.c
writev.c
xnotify.c
y2k.c
y2ktmo.c
yield.c
zerolen.c
.cvsignore
Makefile.in
tools
.cvsignore
.update
Makefile.in
configure.gnu
configure.in
src
.update
AUTHORS
ChangeLog
LINKS
Makefile.in
README
THANKS
TODO
VERSION
acsite.m4
config.hw
configure.ac
configure.gnu
js-config.1
js-config.sh.in
js.1
js.3
js.pc.in
jslint.js
libtool.m4
shtool
ldns
libcodec2
libdingaling
libedit
libg722_1
libks
libnatpmp
libscgi
libsndfile
libteletone
libtpl-1.5
libwebsockets
libzrtp
miniupnpc
openzap
pcre
portaudio
silk
sofia-sip
spandsp
speex
sqlite
srtp
stfu
tiff-4.0.2
unimrcp
win32
xmlrpc-c
yaml
.gitignore
patches
scripts
src
support-d
w32
web
.gitattributes
.gitignore
CMakeLists.txt
Freeswitch.2005.unsupported.sln
Freeswitch.2008.express.unsupported.sln
Freeswitch.2008.sln.debug.bat
Freeswitch.2008.sln.release.bat
Freeswitch.2008.unsupported.sln
Freeswitch.2010.express.sln
Freeswitch.2010.sln
Freeswitch.2012.sln
INSTALL
Makefile.am
acinclude.m4
bootstrap.sh
cc.sh
cluecon.tmpl
cluecon2.tmpl
cluecon2_small.tmpl
cluecon_small.tmpl
configure.in
devel-bootstrap.sh
erlang.spec
freeswitch-sounds-en-us-callie.spec
freeswitch-sounds-music.spec
freeswitch-sounds-ru-RU-elena.spec
freeswitch.spec
swig_common.i
freeswitch/libs/js/nsprpub/pr/tests/selintr.c

82 lines
2.6 KiB
C
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the Netscape Portable Runtime (NSPR).
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Test whether classic NSPR's select() wrapper properly blocks
* the periodic SIGALRM clocks. On some platforms (such as
* HP-UX and SINIX) an interrupted select() system call is
* restarted with the originally specified timeout, ignoring
* the time that has elapsed. If a select() call is interrupted
* repeatedly, it will never time out. (See Bugzilla bug #39674.)
*/
#if !defined(XP_UNIX)
/*
* This test is applicable to Unix only.
*/
int main()
{
return 0;
}
#else /* XP_UNIX */
#include "nspr.h"
#include <sys/time.h>
#include <stdio.h>
int main()
{
struct timeval timeout;
int rv;
PR_SetError(0, 0); /* force NSPR to initialize */
PR_EnableClockInterrupts();
/* 2 seconds timeout */
timeout.tv_sec = 2;
timeout.tv_usec = 0;
rv = select(1, NULL, NULL, NULL, &timeout);
printf("select returned %d\n", rv);
return 0;
}
#endif /* XP_UNIX */