~ubuntu-branches/ubuntu/precise/amule-adunanza/precise

« back to all changes in this revision

Viewing changes to src/CFile.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-02-18 21:16:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100218211623-gptwe60zx1knfkmu
Tags: 2010.1+2.2.6-0ubuntu1
* New upstream release (LP: #524697)
  - Drop manpages_spelling_fixes.diff fixed by upstream
  - Drop cryptopp-reference.diff fixed by upstream
  - Bump Standards-Version no changes required
  - Update install files (amule -> amuleadunanza)
  - debian/rules: amule.xpm -> amuleadunanza.xpm
  - Add README.Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
// This file is part of the aMule Project.
3
3
//
4
 
// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org )
 
4
// Copyright (c) 2003-2009 aMule Team ( admin@amule.org / http://www.amule.org )
5
5
// Copyright (c) 1998 Vadim Zeitlin ( zeitlin@dptmaths.ens-cachan.fr )
6
6
//
7
7
// Any parts of this program derived from the xMule, lMule or eMule project,
263
263
        wxASSERT_MSG(tmpFileName, wxT("Convertion failed in CFile::Open"));
264
264
 
265
265
        m_filePath = fileName;
 
266
// ADUNANZA BEGIN
 
267
#if !defined(MSVC)
266
268
        m_fd = open(tmpFileName, flags, accessMode);
 
269
#else
 
270
        m_fd = _open(tmpFileName, flags, accessMode);
 
271
#endif
 
272
// ADUNANZA END
267
273
        syscall_check(m_fd != fd_invalid, m_filePath, wxT("opening file"));
268
274
        
269
275
        return IsOpened();
274
280
{
275
281
        MULE_VALIDATE_STATE(IsOpened(), wxT("CFile: Cannot close closed file."));
276
282
 
 
283
// ADUNANZA BEGIN
 
284
#if !defined(MSVC)
277
285
        bool closed = (close(m_fd) != -1);
 
286
#else
 
287
        bool closed = (_close(m_fd) != -1);
 
288
#endif
 
289
// ADUNANZA END
278
290
        syscall_check(closed, m_filePath, wxT("closing file"));
279
291
        
280
292
        m_fd = fd_invalid;