Mercurial > mplayer.hg
annotate libdvdread/md5.h @ 27594:2a014f30d031
Update the copyright statement.
author | syrjala |
---|---|
date | Mon, 15 Sep 2008 20:46:43 +0000 |
parents | ea01824701a5 |
children |
rev | line source |
---|---|
27466
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
1 /* -*- c-basic-offset: 2; indent-tabs-mode: nil -*- */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
2 /* md5.h - Declaration of functions and data types used for MD5 sum |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
3 computing library functions. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
4 Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
5 NOTE: The canonical source of this file is maintained with the GNU C |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
6 Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
7 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
8 This program is free software; you can redistribute it and/or modify it |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
9 under the terms of the GNU General Public License as published by the |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
10 Free Software Foundation; either version 2, or (at your option) any |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
11 later version. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
12 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
13 This program is distributed in the hope that it will be useful, |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
16 GNU General Public License for more details. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
17 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
18 You should have received a copy of the GNU General Public License |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
19 along with this program; if not, write to the Free Software Foundation, |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
20 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
21 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
22 #ifndef _MD5_H |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
23 #define _MD5_H 1 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
24 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
25 #include <stdio.h> |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
26 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
27 #if defined HAVE_LIMITS_H || _LIBC |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
28 # include <limits.h> |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
29 #endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
30 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
31 /* The following contortions are an attempt to use the C preprocessor |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
32 to determine an unsigned integral type that is 32 bits wide. An |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
33 alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
34 doing that would require that the configure script compile and *run* |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
35 the resulting executable. Locally running cross-compiled executables |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
36 is usually not possible. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
37 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
38 #ifdef _LIBC |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
39 # include <sys/types.h> |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
40 typedef u_int32_t md5_uint32; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
41 #else |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
42 # if defined __STDC__ && __STDC__ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
43 # define UINT_MAX_32_BITS 4294967295U |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
44 # else |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
45 # define UINT_MAX_32_BITS 0xFFFFFFFF |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
46 # endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
47 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
48 /* If UINT_MAX isn't defined, assume it's a 32-bit type. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
49 This should be valid for all systems GNU cares about because |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
50 that doesn't include 16-bit systems, and only modern systems |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
51 (that certainly have <limits.h>) have 64+-bit integral types. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
52 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
53 # ifndef UINT_MAX |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
54 # define UINT_MAX UINT_MAX_32_BITS |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
55 # endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
56 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
57 # if UINT_MAX == UINT_MAX_32_BITS |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
58 typedef unsigned int md5_uint32; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
59 # else |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
60 # if USHRT_MAX == UINT_MAX_32_BITS |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
61 typedef unsigned short md5_uint32; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
62 # else |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
63 # if ULONG_MAX == UINT_MAX_32_BITS |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
64 typedef unsigned long md5_uint32; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
65 # else |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
66 /* The following line is intended to evoke an error. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
67 Using #error is not portable enough. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
68 "Cannot determine unsigned 32-bit data type." |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
69 # endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
70 # endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
71 # endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
72 #endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
73 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
74 #undef __P |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
75 #if defined (__STDC__) && __STDC__ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
76 #define __P(x) x |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
77 #else |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
78 #define __P(x) () |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
79 #endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
80 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
81 /* Structure to save state of computation between the single steps. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
82 struct md5_ctx |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
83 { |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
84 md5_uint32 A; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
85 md5_uint32 B; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
86 md5_uint32 C; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
87 md5_uint32 D; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
88 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
89 md5_uint32 total[2]; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
90 md5_uint32 buflen; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
91 char buffer[128]; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
92 }; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
93 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
94 /* |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
95 * The following three functions are build up the low level used in |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
96 * the functions `md5_stream' and `md5_buffer'. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
97 */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
98 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
99 /* Initialize structure containing state of computation. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
100 (RFC 1321, 3.3: Step 3) */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
101 extern void md5_init_ctx __P ((struct md5_ctx *ctx)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
102 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
103 /* Starting with the result of former calls of this function (or the |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
104 initialization function update the context for the next LEN bytes |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
105 starting at BUFFER. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
106 It is necessary that LEN is a multiple of 64!!! */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
107 extern void md5_process_block __P ((const void *buffer, size_t len, |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
108 struct md5_ctx *ctx)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
109 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
110 /* Starting with the result of former calls of this function (or the |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
111 initialization function update the context for the next LEN bytes |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
112 starting at BUFFER. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
113 It is NOT required that LEN is a multiple of 64. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
114 extern void md5_process_bytes __P ((const void *buffer, size_t len, |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
115 struct md5_ctx *ctx)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
116 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
117 /* Process the remaining bytes in the buffer and put result from CTX |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
118 in first 16 bytes following RESBUF. The result is always in little |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
119 endian byte order, so that a byte-wise output yields to the wanted |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
120 ASCII representation of the message digest. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
121 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
122 IMPORTANT: On some systems it is required that RESBUF be correctly |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
123 aligned for a 32 bits value. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
124 extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
125 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
126 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
127 /* Put result from CTX in first 16 bytes following RESBUF. The result is |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
128 always in little endian byte order, so that a byte-wise output yields |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
129 to the wanted ASCII representation of the message digest. |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
130 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
131 IMPORTANT: On some systems it is required that RESBUF is correctly |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
132 aligned for a 32 bits value. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
133 extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
134 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
135 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
136 /* Compute MD5 message digest for bytes read from STREAM. The |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
137 resulting message digest number will be written into the 16 bytes |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
138 beginning at RESBLOCK. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
139 extern int md5_stream __P ((FILE *stream, void *resblock)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
140 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
141 /* Compute MD5 message digest for LEN bytes beginning at BUFFER. The |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
142 result is always in little endian byte order, so that a byte-wise |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
143 output yields to the wanted ASCII representation of the message |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
144 digest. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
145 extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
146 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
147 /* The following is from gnupg-1.0.2's cipher/bithelp.h. */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
148 /* Rotate a 32 bit integer by n bytes */ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
149 #if defined __GNUC__ && defined __i386__ |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
150 static inline md5_uint32 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
151 rol(md5_uint32 x, int n) |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
152 { |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
153 __asm__("roll %%cl,%0" |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
154 :"=r" (x) |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
155 :"0" (x),"c" (n)); |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
156 return x; |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
157 } |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
158 #else |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
159 # define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
160 #endif |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
161 |
ea01824701a5
Rename internal libdvdread fork from dvdread to libdvdread
rathann
parents:
diff
changeset
|
162 #endif |