~ubuntu-branches/ubuntu/raring/ecasound2.2/raring

« back to all changes in this revision

Viewing changes to libecasound/eca-fileio-mmap.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2009-11-02 18:22:35 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091102182235-4ngh7699dmkgonyu
Tags: 2.7.0-1
* New upstream release.
* Depend on libreadline-dev instead of libreadline5-dev by request of
  Mattias Klose. It's now libreadline6-dev. (closes: #553748)
* Update menu file to use section Applications/ instead of Apps/.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// ------------------------------------------------------------------------
2
2
// eca-fileio-mmap.cpp: mmap based file-I/O and buffering routines.
3
 
// Copyright (C) 1999-2002 Kai Vehmanen
 
3
// Copyright (C) 1999-2002,2009 Kai Vehmanen
4
4
//
5
5
// This program is free software; you can redistribute it and/or modify
6
6
// it under the terms of the GNU General Public License as published by
26
26
#include <unistd.h>
27
27
#include <fcntl.h>
28
28
#include <errno.h>
 
29
#ifdef HAVE_SYS_MMAN_H
29
30
#include <sys/mman.h>
 
31
#endif
30
32
#include <sys/stat.h>
31
33
#include <sys/types.h>
32
34
 
86
88
 
87
89
void ECA_FILE_IO_MMAP::close_file(void) {
88
90
//    cerr << fname_rep << ": munmaping region." << endl;
 
91
#ifdef HAVE_MMAP
89
92
  ::munmap(buffer_repp, flength_rep);
90
93
  ::close(fd_rep);
 
94
#endif
91
95
}
92
96
 
93
97
void ECA_FILE_IO_MMAP::read_to_buffer(void* obuf, off_t bytes) {