vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / crypt / ufc-crypt.h
blobaa77ae7d65195d9942ba30fda7811374d5b9998f
1 /*
2 * UFC-crypt: ultra fast crypt(3) implementation
4 * Copyright (C) 1991, 1992, Free Software Foundation, Inc.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 * @(#)ufc-crypt.h 1.16 09/21/92
22 * Definitions of datatypes
26 #include <SupportDefs.h>
28 /*
29 * Requirements for datatypes:
31 * A datatype 'ufc_long' of at least 32 bit
32 * *and*
33 * A type 'long32' of exactly 32 bits (_UFC_32_)
34 * *or*
35 * A type 'long64' of exactly 64 bits (_UFC_64_)
37 * 'int' is assumed to be at least 8 bit
41 * #ifdef's for various architectures
44 #ifdef cray
45 /* thanks to <hutton@opus.sdsc.edu> (Tom Hutton) for testing */
46 typedef unsigned long ufc_long;
47 typedef unsigned long long64;
48 #define _UFC_64_
49 #endif
51 #ifdef convex
52 /* thanks to pcl@convex.oxford.ac.uk (Paul Leyland) for testing */
53 typedef unsigned long ufc_long;
54 typedef long long long64;
55 #define _UFC_64_
56 #endif
58 #ifdef ksr
59 /*
60 * Note - the KSR machine does not define a unique symbol
61 * which we can check. So you MUST add '-Dksr' to your Makefile.
62 * Thanks to lijewski@theory.tc.cornell.edu (Mike Lijewski) for
63 * the patch.
65 typedef unsigned long ufc_long;
66 typedef unsigned long long64;
67 #define _UFC_64_
68 #endif
71 * For debugging 64 bit code etc with 'gcc'
74 #ifdef GCC3232
75 typedef unsigned long ufc_long;
76 typedef unsigned long long32;
77 #define _UFC_32_
78 #endif
80 #ifdef GCC3264
81 typedef unsigned long ufc_long;
82 typedef long long long64;
83 #define _UFC_64_
84 #endif
86 #ifdef GCC6432
87 typedef long long ufc_long;
88 typedef unsigned long long32;
89 #define _UFC_32_
90 #endif
92 #ifdef GCC6464
93 typedef long long ufc_long;
94 typedef long long long64;
95 #define _UFC_64_
96 #endif
99 * Catch all for 99.95% of all UNIX machines
102 #ifndef _UFC_64_
103 #ifndef _UFC_32_
104 #if B_HAIKU_64_BIT
105 #define _UFC_64_
106 typedef unsigned long long64;
107 #else
108 #define _UFC_32_
109 typedef unsigned long long32;
110 #endif
111 typedef unsigned long ufc_long;
112 #endif
113 #endif