diff options
Diffstat (limited to '3rd_party/libsrp6a-sha512/t_defines.h')
-rw-r--r-- | 3rd_party/libsrp6a-sha512/t_defines.h | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/3rd_party/libsrp6a-sha512/t_defines.h b/3rd_party/libsrp6a-sha512/t_defines.h new file mode 100644 index 0000000..447263f --- /dev/null +++ b/3rd_party/libsrp6a-sha512/t_defines.h | |||
@@ -0,0 +1,137 @@ | |||
1 | /* | ||
2 | * Copyright (c) 1997-2007 The Stanford SRP Authentication Project | ||
3 | * All Rights Reserved. | ||
4 | * | ||
5 | * Permission is hereby granted, free of charge, to any person obtaining | ||
6 | * a copy of this software and associated documentation files (the | ||
7 | * "Software"), to deal in the Software without restriction, including | ||
8 | * without limitation the rights to use, copy, modify, merge, publish, | ||
9 | * distribute, sublicense, and/or sell copies of the Software, and to | ||
10 | * permit persons to whom the Software is furnished to do so, subject to | ||
11 | * the following conditions: | ||
12 | * | ||
13 | * The above copyright notice and this permission notice shall be | ||
14 | * included in all copies or substantial portions of the Software. | ||
15 | * | ||
16 | * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, | ||
17 | * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY | ||
18 | * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. | ||
19 | * | ||
20 | * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL, | ||
21 | * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER | ||
22 | * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF | ||
23 | * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT | ||
24 | * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
25 | * | ||
26 | * Redistributions in source or binary form must retain an intact copy | ||
27 | * of this copyright notice. | ||
28 | */ | ||
29 | |||
30 | #ifndef T_DEFINES_H | ||
31 | #define T_DEFINES_H | ||
32 | |||
33 | #ifndef P | ||
34 | #if defined(__STDC__) || defined(__cplusplus) | ||
35 | #define P(x) x | ||
36 | #else | ||
37 | #define P(x) () | ||
38 | #endif | ||
39 | #endif | ||
40 | |||
41 | #ifdef HAVE_CONFIG_H | ||
42 | #include "config.h" | ||
43 | #endif /* HAVE_CONFIG_H */ | ||
44 | |||
45 | #ifndef _DLLDECL | ||
46 | #define _DLLDECL | ||
47 | |||
48 | #ifdef MSVC15 /* MSVC1.5 support for 16 bit apps */ | ||
49 | #define _MSVC15EXPORT _export | ||
50 | #define _MSVC20EXPORT | ||
51 | #define _DLLAPI _export _pascal | ||
52 | #define _CDECL | ||
53 | #define _TYPE(a) a _MSVC15EXPORT | ||
54 | #define DLLEXPORT 1 | ||
55 | |||
56 | #elif defined(MSVC20) || (defined(_USRDLL) && defined(SRP_EXPORTS)) | ||
57 | #define _MSVC15EXPORT | ||
58 | #define _MSVC20EXPORT _declspec(dllexport) | ||
59 | #define _DLLAPI | ||
60 | #define _CDECL | ||
61 | #define _TYPE(a) _MSVC20EXPORT a | ||
62 | #define DLLEXPORT 1 | ||
63 | |||
64 | #else /* Default, non-dll. Use this for Unix or DOS */ | ||
65 | #define _MSVC15DEXPORT | ||
66 | #define _MSVC20EXPORT | ||
67 | #define _DLLAPI | ||
68 | #if defined(WINDOWS) || defined(WIN32) | ||
69 | #define _CDECL _cdecl | ||
70 | #else | ||
71 | #define _CDECL | ||
72 | #endif | ||
73 | #define _TYPE(a) a _CDECL | ||
74 | #endif | ||
75 | #endif | ||
76 | |||
77 | #if STDC_HEADERS | ||
78 | #include <stdlib.h> | ||
79 | #include <string.h> | ||
80 | #else /* not STDC_HEADERS */ | ||
81 | #ifndef HAVE_STRCHR | ||
82 | #define strchr index | ||
83 | #define strrchr rindex | ||
84 | #endif | ||
85 | char *strchr(), *strrchr(), *strtok(); | ||
86 | #ifndef HAVE_MEMCPY | ||
87 | #define memcpy(d, s, n) bcopy((s), (d), (n)) | ||
88 | #endif | ||
89 | #endif /* not STDC_HEADERS */ | ||
90 | |||
91 | #include <sys/types.h> | ||
92 | |||
93 | #if TIME_WITH_SYS_TIME | ||
94 | #include <sys/time.h> | ||
95 | #include <time.h> | ||
96 | #else /* not TIME_WITH_SYS_TIME */ | ||
97 | #if HAVE_SYS_TIME_H | ||
98 | #include <sys/time.h> | ||
99 | #else | ||
100 | #include <time.h> | ||
101 | #endif | ||
102 | #endif /* not TIME_WITH_SYS_TIME */ | ||
103 | |||
104 | #if HAVE_TERMIOS_H | ||
105 | #include <termios.h> | ||
106 | #define STTY(fd, termio) tcsetattr(fd, TCSANOW, termio) | ||
107 | #define GTTY(fd, termio) tcgetattr(fd, termio) | ||
108 | #define TERMIO struct termios | ||
109 | #define USE_TERMIOS | ||
110 | #elif HAVE_TERMIO_H | ||
111 | #include <sys/ioctl.h> | ||
112 | #include <termio.h> | ||
113 | #define STTY(fd, termio) ioctl(fd, TCSETA, termio) | ||
114 | #define GTTY(fd, termio) ioctl(fd, TCGETA, termio) | ||
115 | #define TEMRIO struct termio | ||
116 | #define USE_TERMIO | ||
117 | #elif HAVE_SGTTY_H | ||
118 | #include <sgtty.h> | ||
119 | #define STTY(fd, termio) stty(fd, termio) | ||
120 | #define GTTY(fd, termio) gtty(fd, termio) | ||
121 | #define TERMIO struct sgttyb | ||
122 | #define USE_SGTTY | ||
123 | #endif | ||
124 | |||
125 | #ifdef WIN32 | ||
126 | #define USE_FTIME 1 | ||
127 | #define USE_RENAME 1 | ||
128 | #define NO_FCHMOD 1 | ||
129 | #endif | ||
130 | |||
131 | #ifdef USE_FTIME | ||
132 | #include <sys/timeb.h> | ||
133 | #endif | ||
134 | |||
135 | /* Looking for BigInteger math functions? They've moved to <srp_aux.h>. */ | ||
136 | |||
137 | #endif | ||