~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to include/my_nosys.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2000 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
/*
 
17
  Header to remove use of my_functions in functions where we need speed and
 
18
  where calls to posix functions should work
 
19
*/
 
20
#ifndef _my_nosys_h
 
21
#define _my_nosys_h
 
22
#ifdef  __cplusplus
 
23
extern "C" {
 
24
#endif
 
25
 
 
26
#ifndef __MY_NOSYS__
 
27
#define __MY_NOSYS__
 
28
 
 
29
#ifndef HAVE_STDLIB_H
 
30
#include <malloc.h>
 
31
#endif
 
32
 
 
33
#undef my_read                  /* Can be predefined in raid.h */
 
34
#undef my_write
 
35
#undef my_seek
 
36
#define my_read(a,b,c,d) my_quick_read(a,b,c,d)
 
37
#define my_write(a,b,c,d) my_quick_write(a,b,c)
 
38
extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count,
 
39
                            myf myFlags);
 
40
extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count);
 
41
 
 
42
#if !defined(SAFEMALLOC) && defined(USE_HALLOC)
 
43
#define my_malloc(a,b) halloc(a,1)
 
44
#define my_no_flags_free(a) hfree(a)
 
45
#endif
 
46
 
 
47
#endif /* __MY_NOSYS__ */
 
48
 
 
49
#ifdef  __cplusplus
 
50
}
 
51
#endif
 
52
#endif