Eliminate remaining calls to stat in apps/apps.c and unify WIN32_rename for
[openssl.git] / apps / apps.h
index 26dcbc5771d5ca1888830468e6d8c66fbcf8fd18..3edcf0a56259675c550bbc1983769d5167c9d1f5 100644 (file)
@@ -134,11 +134,6 @@ long app_RAND_load_files(char *file); /* `file' is a list of files to read,
                                        * (see e_os.h).  The string is
                                        * destroyed! */
 
-#ifdef OPENSSL_SYS_WIN32
-#define rename(from,to) WIN32_rename((from),(to))
-int WIN32_rename(const char *oldname,const char *newname);
-#endif
-
 #ifndef MONOLITH
 
 #define MAIN(a,v)      main(a,v)
@@ -176,50 +171,20 @@ extern BIO *bio_err;
 #  define apps_shutdown()
 #else
 #  ifndef OPENSSL_NO_ENGINE
-#    if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
-     defined(OPENSSL_SYS_WIN32)
-#      ifdef _O_BINARY
-#        define apps_startup() \
-                       do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
-                       ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
-                       ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
-#      else
-#        define apps_startup() \
-                       do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
+#    define apps_startup() \
+                       do { do_pipe_sig(); CRYPTO_malloc_init(); \
                        ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
                        ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
-#      endif
-#    else
-#      define apps_startup() \
-                       do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
-                       ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
-                       setup_ui_method(); } while(0)
-#    endif
 #    define apps_shutdown() \
                        do { CONF_modules_unload(1); destroy_ui_method(); \
                        EVP_cleanup(); ENGINE_cleanup(); \
                        CRYPTO_cleanup_all_ex_data(); ERR_remove_state(0); \
                        ERR_free_strings(); } while(0)
 #  else
-#    if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN16) || \
-     defined(OPENSSL_SYS_WIN32)
-#      ifdef _O_BINARY
-#        define apps_startup() \
-                       do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
-                       ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
-                       setup_ui_method(); } while(0)
-#      else
-#        define apps_startup() \
-                       do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
+#    define apps_startup() \
+                       do { do_pipe_sig(); CRYPTO_malloc_init(); \
                        ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
                        setup_ui_method(); } while(0)
-#      endif
-#    else
-#      define apps_startup() \
-                       do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
-                       ERR_load_crypto_strings(); \
-                       setup_ui_method(); } while(0)
-#    endif
 #    define apps_shutdown() \
                        do { CONF_modules_unload(1); destroy_ui_method(); \
                        EVP_cleanup(); \
@@ -331,6 +296,10 @@ void policies_print(BIO *out, X509_STORE_CTX *ctx);
 #define FORMAT_ENGINE   7
 #define FORMAT_IISSGC  8       /* XXX this stupid macro helps us to avoid
                                 * adding yet another param to load_*key() */
+#define FORMAT_PEMRSA  9       /* PEM RSAPubicKey format */
+#define FORMAT_ASN1RSA 10      /* DER RSAPubicKey format */
+#define FORMAT_MSBLOB  11      /* MS Key blob format */
+#define FORMAT_PVK     12      /* MS PVK file format */
 
 #define EXT_COPY_NONE  0
 #define EXT_COPY_ADD   1
@@ -342,4 +311,7 @@ void policies_print(BIO *out, X509_STORE_CTX *ctx);
 
 #define SERIAL_RAND_BITS       64
 
+int app_isdir(const char *);
+int raw_read_stdin(void *,int);
+int raw_write_stdout(const void *,int);
 #endif