~ubuntu-branches/ubuntu/gutsy/curl/gutsy-updates

« back to all changes in this revision

Viewing changes to lib/memdebug.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-08-01 12:22:30 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070801122230-uaarmp6lo65py9t6
Tags: 7.16.4-1ubuntu1
* Merge with Debian.
  - Drop debian/patches/gnutls-verifications, applied upstream.
  - Remove all stuff which should be reverted according to 7.16.2-6ubuntu4.
  - Remaining change: drop stunnel build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20
20
 * KIND, either express or implied.
21
21
 *
22
 
 * $Id: memdebug.c,v 1.51 2007-02-21 19:03:20 yangtse Exp $
 
22
 * $Id: memdebug.c,v 1.53 2007-06-28 11:11:29 jehousley Exp $
23
23
 ***************************************************************************/
24
24
 
25
25
#include "setup.h"
73
73
      logfile = fopen(logname, "w");
74
74
    else
75
75
      logfile = stderr;
 
76
#ifdef MEMDEBUG_LOG_SYNC
 
77
    /* Flush the log file after every line so the log isn't lost in a crash */
 
78
    setvbuf(logfile, (char *)NULL, _IOLBF, 0);
 
79
#endif
76
80
  }
77
81
}
78
82
 
276
280
  return res;
277
281
}
278
282
 
 
283
FILE *curl_fdopen(int filedes, const char *mode,
 
284
                  int line, const char *source)
 
285
{
 
286
  FILE *res=(fdopen)(filedes, mode);
 
287
  if(logfile)
 
288
    fprintf(logfile, "FILE %s:%d fdopen(\"%d\",\"%s\") = %p\n",
 
289
            source, line, filedes, mode, res);
 
290
  return res;
 
291
}
 
292
 
279
293
int curl_fclose(FILE *file, int line, const char *source)
280
294
{
281
295
  int res;