~ubuntu-branches/ubuntu/raring/curl/raring-proposed

« back to all changes in this revision

Viewing changes to tests/libtest/lib597.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-02-12 08:54:32 UTC
  • mfrom: (3.4.34 sid)
  • Revision ID: package-import@ubuntu.com-20130212085432-r1fyi0b37enr93pp
Tags: 7.29.0-1ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Add warning to debian/patches/series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
21
21
 ***************************************************************************/
22
22
#include "test.h"
23
23
 
 
24
#ifdef HAVE_LIMITS_H
 
25
#include <limits.h>
 
26
#endif
 
27
 
24
28
#include "testutil.h"
25
29
#include "warnless.h"
26
30
#include "memdebug.h"
113
117
      /* At this point, timeout is guaranteed to be greater or equal than -1. */
114
118
 
115
119
      if(timeout != -1L) {
116
 
        interval.tv_sec = timeout/1000;
117
 
        interval.tv_usec = (timeout%1000)*1000;
 
120
        int itimeout = (timeout > (long)INT_MAX) ? INT_MAX : (int)timeout;
 
121
        interval.tv_sec = itimeout/1000;
 
122
        interval.tv_usec = (itimeout%1000)*1000;
118
123
      }
119
124
      else {
120
125
        interval.tv_sec = TEST_HANG_TIMEOUT/1000+1;