~ubuntu-branches/ubuntu/quantal/nspr/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/tests/nonblock.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-08-10 11:34:26 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810113426-3uv4diflrkcbdimm
Tags: 4.8-0ubuntu1
* New upstream release: 4.8 (LP: #387812)
* adjust patches to changed upstreanm codebase
  - update debian/patches/99_configure.patch
* update shlibs symbols to include new API elements
  - update debian/libnspr4-0d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include "prprf.h"
43
43
#include "prnetdb.h"
44
44
#include "plerror.h"
45
 
#ifndef XP_MAC
46
45
#include "obsolete/probslet.h"
47
 
#else
48
 
#include "probslet.h"
49
 
#endif
50
46
 
51
47
#include <stdio.h>
52
48
#include <string.h>
59
55
** Make win16 unit_time interval 300 milliseconds, others get 100
60
56
*/
61
57
#define UNIT_TIME  200       /* unit time in milliseconds */
 
58
#elif defined(SYMBIAN)
 
59
#define UNIT_TIME  5000      /* unit time in milliseconds */
62
60
#else
63
61
#define UNIT_TIME  100       /* unit time in milliseconds */
64
62
#endif
70
68
#include "pprio.h"
71
69
#endif
72
70
 
73
 
#ifdef XP_MAC
74
 
int fprintf(FILE *stream, const char *fmt, ...)
75
 
{
76
 
PR_LogPrint(fmt);
77
 
return 0;
78
 
}
79
 
#define printf PR_LogPrint
80
 
extern void SetupMacPrintfLog(char *logFile);
81
 
#endif
82
 
 
83
71
static void PR_CALLBACK
84
72
clientThreadFunc(void *arg)
85
73
{
163
151
    PRIntn i;
164
152
    PRIntervalTime unitTime = PR_MillisecondsToInterval(UNIT_TIME);
165
153
 
166
 
#ifdef XP_MAC
167
 
        SetupMacPrintfLog("nonblock.log");
168
 
#endif
169
 
 
170
154
    /* Create a listening socket */
171
155
    if ((listenSock = PR_NewTCPSocket()) == NULL) {
172
156
        fprintf(stderr, "Can't create a new TCP socket\n");
262
246
    return 0;
263
247
}
264
248
 
265
 
PRIntn main(PRIntn argc, char *argv[])
 
249
int main(int argc, char **argv)
266
250
{
267
251
    PRIntn rv;
268
252