Forráskód Böngészése

Add library init/exit dummy functions

bel 8 éve
szülő
commit
fd6c55eb64
2 módosított fájl, 27 hozzáadás és 0 törlés
  1. 8 0
      include/civetweb.h
  2. 19 0
      src/civetweb.c

+ 8 - 0
include/civetweb.h

@@ -49,6 +49,14 @@ extern "C" {
 #endif /* __cplusplus */
 #endif /* __cplusplus */
 
 
 
 
+/* Initialize this library. This should be called before any other function. */
+int mg_init_library(unsigned features);
+
+
+/* Un-initialize this library. */
+int mg_exit_library(void);
+
+
 struct mg_context;    /* Handle for the HTTP service itself */
 struct mg_context;    /* Handle for the HTTP service itself */
 struct mg_connection; /* Handle for the individual connection */
 struct mg_connection; /* Handle for the individual connection */
 
 

+ 19 - 0
src/civetweb.c

@@ -14720,4 +14720,23 @@ mg_print_system_info(int prm1, char *prm2)
 	return 0;
 	return 0;
 }
 }
 
 
+
+/* Initialize this library. */
+int
+mg_init_library(unsigned features)
+{
+	/* Currently we do nothing here. This is planned for Version 1.10.
+	 * For now, we just add this function, so clients can be changed early. */
+	return 1;
+}
+
+
+/* Un-initialize this library. */
+int
+mg_exit_library(void)
+{
+	return 1;
+}
+
+
 /* End of civetweb.c */
 /* End of civetweb.c */