xref: /freebsd/crypto/openssl/ms/uplink.h (revision e0c4386e7e71d93b0edc0c8fa156263fc4a8b0b6)
1*e0c4386eSCy Schubert /*
2*e0c4386eSCy Schubert  * Copyright 2004-2016 The OpenSSL Project Authors. All Rights Reserved.
3*e0c4386eSCy Schubert  *
4*e0c4386eSCy Schubert  * Licensed under the Apache License 2.0 (the "License").  You may not use
5*e0c4386eSCy Schubert  * this file except in compliance with the License.  You can obtain a copy
6*e0c4386eSCy Schubert  * in the file LICENSE in the source distribution or at
7*e0c4386eSCy Schubert  * https://www.openssl.org/source/license.html
8*e0c4386eSCy Schubert  */
9*e0c4386eSCy Schubert 
10*e0c4386eSCy Schubert #define APPMACROS_ONLY
11*e0c4386eSCy Schubert #include "applink.c"
12*e0c4386eSCy Schubert 
13*e0c4386eSCy Schubert extern void *OPENSSL_UplinkTable[];
14*e0c4386eSCy Schubert 
15*e0c4386eSCy Schubert #define UP_stdin  (*(void *(*)(void))OPENSSL_UplinkTable[APPLINK_STDIN])()
16*e0c4386eSCy Schubert #define UP_stdout (*(void *(*)(void))OPENSSL_UplinkTable[APPLINK_STDOUT])()
17*e0c4386eSCy Schubert #define UP_stderr (*(void *(*)(void))OPENSSL_UplinkTable[APPLINK_STDERR])()
18*e0c4386eSCy Schubert #define UP_fprintf (*(int (*)(void *,const char *,...))OPENSSL_UplinkTable[APPLINK_FPRINTF])
19*e0c4386eSCy Schubert #define UP_fgets  (*(char *(*)(char *,int,void *))OPENSSL_UplinkTable[APPLINK_FGETS])
20*e0c4386eSCy Schubert #define UP_fread  (*(size_t (*)(void *,size_t,size_t,void *))OPENSSL_UplinkTable[APPLINK_FREAD])
21*e0c4386eSCy Schubert #define UP_fwrite (*(size_t (*)(const void *,size_t,size_t,void *))OPENSSL_UplinkTable[APPLINK_FWRITE])
22*e0c4386eSCy Schubert #define UP_fsetmod (*(int (*)(void *,char))OPENSSL_UplinkTable[APPLINK_FSETMOD])
23*e0c4386eSCy Schubert #define UP_feof   (*(int (*)(void *))OPENSSL_UplinkTable[APPLINK_FEOF])
24*e0c4386eSCy Schubert #define UP_fclose (*(int (*)(void *))OPENSSL_UplinkTable[APPLINK_FCLOSE])
25*e0c4386eSCy Schubert 
26*e0c4386eSCy Schubert #define UP_fopen  (*(void *(*)(const char *,const char *))OPENSSL_UplinkTable[APPLINK_FOPEN])
27*e0c4386eSCy Schubert #define UP_fseek  (*(int (*)(void *,long,int))OPENSSL_UplinkTable[APPLINK_FSEEK])
28*e0c4386eSCy Schubert #define UP_ftell  (*(long (*)(void *))OPENSSL_UplinkTable[APPLINK_FTELL])
29*e0c4386eSCy Schubert #define UP_fflush (*(int (*)(void *))OPENSSL_UplinkTable[APPLINK_FFLUSH])
30*e0c4386eSCy Schubert #define UP_ferror (*(int (*)(void *))OPENSSL_UplinkTable[APPLINK_FERROR])
31*e0c4386eSCy Schubert #define UP_clearerr (*(void (*)(void *))OPENSSL_UplinkTable[APPLINK_CLEARERR])
32*e0c4386eSCy Schubert #define UP_fileno (*(int (*)(void *))OPENSSL_UplinkTable[APPLINK_FILENO])
33*e0c4386eSCy Schubert 
34*e0c4386eSCy Schubert #define UP_open   (*(int (*)(const char *,int,...))OPENSSL_UplinkTable[APPLINK_OPEN])
35*e0c4386eSCy Schubert #define UP_read   (*(ossl_ssize_t (*)(int,void *,size_t))OPENSSL_UplinkTable[APPLINK_READ])
36*e0c4386eSCy Schubert #define UP_write  (*(ossl_ssize_t (*)(int,const void *,size_t))OPENSSL_UplinkTable[APPLINK_WRITE])
37*e0c4386eSCy Schubert #define UP_lseek  (*(long (*)(int,long,int))OPENSSL_UplinkTable[APPLINK_LSEEK])
38*e0c4386eSCy Schubert #define UP_close  (*(int (*)(int))OPENSSL_UplinkTable[APPLINK_CLOSE])
39