| OLD | NEW |
| 1 /* zutil.c -- target dependent utility functions for the compression library | 1 /* zutil.c -- target dependent utility functions for the compression library |
| 2 * Copyright (C) 1995-2005 Jean-loup Gailly. | 2 * Copyright (C) 1995-2005 Jean-loup Gailly. |
| 3 * For conditions of distribution and use, see copyright notice in zlib.h | 3 * For conditions of distribution and use, see copyright notice in zlib.h |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /* @(#) $Id: zutil.c,v 3.11 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */ | 6 /* @(#) $Id: zutil.c,v 3.11 2005/08/04 19:14:14 tor%cs.brown.edu Exp $ */ |
| 7 | 7 |
| 8 #include "zutil.h" | 8 #include "zutil.h" |
| 9 | 9 |
| 10 #ifndef NO_DUMMY_DECL | 10 #ifndef NO_DUMMY_DECL |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 int err; | 134 int err; |
| 135 { | 135 { |
| 136 return ERR_MSG(err); | 136 return ERR_MSG(err); |
| 137 } | 137 } |
| 138 | 138 |
| 139 #if defined(_WIN32_WCE) | 139 #if defined(_WIN32_WCE) |
| 140 /* The Microsoft C Run-Time Library for Windows CE doesn't have | 140 /* The Microsoft C Run-Time Library for Windows CE doesn't have |
| 141 * errno. We define it as a global variable to simplify porting. | 141 * errno. We define it as a global variable to simplify porting. |
| 142 * Its value is always 0 and should not be used. | 142 * Its value is always 0 and should not be used. |
| 143 */ | 143 */ |
| 144 int errno = 0; | 144 // Google Gears modification: zutil.h defines errno as z_errno for WinCE. |
| 145 //int errno = 0; |
| 146 int z_errno = 0; |
| 145 #endif | 147 #endif |
| 146 | 148 |
| 147 #ifndef HAVE_MEMCPY | 149 #ifndef HAVE_MEMCPY |
| 148 | 150 |
| 149 void zmemcpy(dest, source, len) | 151 void zmemcpy(dest, source, len) |
| 150 Bytef* dest; | 152 Bytef* dest; |
| 151 const Bytef* source; | 153 const Bytef* source; |
| 152 uInt len; | 154 uInt len; |
| 153 { | 155 { |
| 154 if (len == 0) return; | 156 if (len == 0) return; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 311 |
| 310 void zcfree (opaque, ptr) | 312 void zcfree (opaque, ptr) |
| 311 voidpf opaque; | 313 voidpf opaque; |
| 312 voidpf ptr; | 314 voidpf ptr; |
| 313 { | 315 { |
| 314 free(ptr); | 316 free(ptr); |
| 315 if (opaque) return; /* make compiler happy */ | 317 if (opaque) return; /* make compiler happy */ |
| 316 } | 318 } |
| 317 | 319 |
| 318 #endif /* MY_ZCALLOC */ | 320 #endif /* MY_ZCALLOC */ |
| OLD | NEW |