~ubuntu-branches/ubuntu/saucy/nspr/saucy-updates

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/tests/sel_spd.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:
47
47
#include <stdio.h>
48
48
#include <errno.h>
49
49
#include <string.h>
50
 
 
51
 
#ifdef XP_MAC
52
 
#include "prlog.h"
53
 
int fprintf(FILE *stream, const char *fmt, ...)
54
 
{
55
 
PR_LogPrint(fmt);
56
 
return 0;
57
 
}
58
 
#define printf PR_LogPrint
59
 
extern void SetupMacPrintfLog(char *logFile);
 
50
#ifdef SYMBIAN
 
51
#include <getopt.h>
60
52
#endif
61
53
 
62
54
#define PORT_BASE 19000
73
65
static long _iterations = 5;
74
66
static long _client_data = 8192;
75
67
 
76
 
#if defined(XP_MAC)
 
68
#ifdef SYMBIAN
77
69
/*
78
 
 * Mac does not scale well specially the requirement for thread stack
 
70
 * Symbian OS does not scale well specially the requirement for thread stack
79
71
 * space and buffer allocation space.  It is easy to get into a fragmented
80
72
 * memory and not be able to allocate thread stack or client/server data
81
73
 * buffer.
82
 
*/
 
74
 */
83
75
static long _server_data = (8*1024);
84
76
static long _threads_max = 10, _threads = 10;
85
77
#else
485
477
        PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
486
478
    PR_STDIO_INIT();
487
479
 
488
 
#ifdef XP_MAC
489
 
        SetupMacPrintfLog("sel_spd.log");
490
 
#endif
491
 
 
492
480
        fprintf(stdout, "Running test for %d iterations with %d simultaneous threads.\n", 
493
481
                _iterations, _threads);
494
482
        fprintf(stdout, "\tWill send %d bytes of client data and %d bytes of server data\n",