Mercurial > mxe-octave
annotate src/libgcrypt-test.c @ 5893:53a6c7df43f8
Mesa 3D: Update to version 21.1.8.
* src/mesa.mk: Update version and checksum.
* src/mesa-2-uninitialized.patch: Remove file.
* dist-files.mk: Remove file from list.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 16 Sep 2021 22:37:45 +0200 |
parents | 3a37e58eab36 |
children |
rev | line source |
---|---|
2442
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
1 /* |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
2 * This file is part of MXE. |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
3 * See index.html for further information. |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
4 */ |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
5 |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
6 #include <stdio.h> |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
7 #include <gcrypt.h> |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
8 |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
9 int main(int argc, char *argv[]) |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
10 { |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
11 (void)argc; |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
12 (void)argv; |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
13 |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
14 if (!gcry_check_version (GCRYPT_VERSION)) { |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
15 fputs ("libgcrypt version mismatch\n", stderr); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
16 exit (2); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
17 } |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
18 |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
19 gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
20 gcry_control (GCRYCTL_INIT_SECMEM, 16384, 0); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
21 gcry_control (GCRYCTL_RESUME_SECMEM_WARN); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
22 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
23 |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
24 if (!gcry_control (GCRYCTL_INITIALIZATION_FINISHED_P)) { |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
25 fputs ("libgcrypt has not been initialized\n", stderr); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
26 abort (); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
27 } |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
28 |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
29 printf("gcrypt version: %s", GCRYPT_VERSION ); |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
30 |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
31 return 0; |
3a37e58eab36
package libgcrypt: add test program and prefixed libgcrypt-config
Tony Theodore <tonyt@logyst.com>
parents:
diff
changeset
|
32 } |