fix __cplusplus guards
authorCatalin Pichiu <catalin.pichiu@gmail.com>
Mon, 3 Feb 2020 10:29:44 +0000 (12:29 +0200)
committerCatalin Pichiu <catalin.pichiu@gmail.com>
Mon, 3 Feb 2020 10:29:44 +0000 (12:29 +0200)
* Some functions weren't included in the __cplusplus scope which caused
the compiler to mangle those names which made it impossible for the
linker to find the proper names.

* Properly close all the __cplusplus scopes. Some of them were left
opened and caused weird errors when compiling c++ code.

include/smb2/libsmb2-dcerpc-srvsvc.h
include/smb2/libsmb2-dcerpc.h
include/smb2/libsmb2.h

index 67c75d53adb2716c5cc4bcedd0fef00845edb532..83574b48bbb083441568e190eee441ca386bfe73 100644 (file)
@@ -36,5 +36,8 @@ int srvsvc_netshareenumall_encoder(struct dcerpc_context *ctx,
                                    struct dcerpc_pdu *pdu,
                                    struct smb2_iovec *iov, int offset,
                                    void *ptr);
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_LIBSMB2_DCERPC_SRVSVC_H_ */
index 761d08a821ae46d621d9aa64cfd6e824cbccb4fc..3415b57c78674eb5102302146aecf42497cd897c 100644 (file)
@@ -99,8 +99,8 @@ int dcerpc_process_deferred_pointers(struct dcerpc_context *ctx,
 void dcerpc_add_deferred_pointer(struct dcerpc_context *ctx,
                                  struct dcerpc_pdu *pdu,
                                  dcerpc_coder coder, void *ptr);
-
-
-
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_LIBSMB2_DCERPC_H_ */
index 05b973ee1d4ff6ae3add71a8eed6d5687fd1cfbe..0b5b56de3fbb6eaad7e1e334f6c2f82ab34cc0ce 100644 (file)
@@ -864,9 +864,6 @@ int smb2_echo_async(struct smb2_context *smb2,
  */
 int smb2_echo(struct smb2_context *smb2);
 
-#ifdef __cplusplus
-}
-#endif
 
 /* Low 2 bits desctibe the type */
 #define SHARE_TYPE_DISKTREE  0
@@ -929,4 +926,7 @@ struct srvsvc_netshareenumall_rep {
 int smb2_share_enum_async(struct smb2_context *smb2,
                           smb2_command_cb cb, void *cb_data);
 
+#ifdef __cplusplus
+}
+#endif
 #endif /* !_LIBSMB2_H_ */