#define HAVE_SEND 1
#define SEND_TYPE_ARG1 int
-#define SEND_QUAL_ARG2 const
#define SEND_TYPE_ARG2 void *
#define SEND_TYPE_ARG3 size_t
#define SEND_TYPE_ARG4 int
/* Define to the type of arg 1 for send. */
#define SEND_TYPE_ARG1 int
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2
+/* Define if the type qualifier of arg 2 for send is not const. */
+#define SEND_NONCONST_ARG2
/* Define to the type of arg 2 for send. */
#define SEND_TYPE_ARG2 char *
/* Define to the type of arg 1 for send. */
#define SEND_TYPE_ARG1 int
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2 const
-
/* Define to the type of arg 2 for send. */
#define SEND_TYPE_ARG2 void *
/* Define to the type of arg 1 for send. */
#define SEND_TYPE_ARG1 SOCKET
-/* Define to the type qualifier of arg 2 for send. */
-#define SEND_QUAL_ARG2 const
-
/* Define to the type of arg 2 for send. */
#define SEND_TYPE_ARG2 char *
* which is used to write outgoing data on a connected socket.
* If yours has another name then do not define HAVE_SEND.
*
- * If HAVE_SEND is defined then SEND_TYPE_ARG1, SEND_QUAL_ARG2,
- * SEND_TYPE_ARG2, SEND_TYPE_ARG3, SEND_TYPE_ARG4 and
- * SEND_TYPE_RETV must also be defined.
+ * If HAVE_SEND is defined then SEND_TYPE_ARG1, SEND_TYPE_ARG2,
+ * SEND_TYPE_ARG3, SEND_TYPE_ARG4 and SEND_TYPE_RETV must also
+ * be defined. SEND_NONCONST_ARG2 must also be defined if ARG2
+ * does not accept const.
*/
#define sread(x, y, z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
(SEND_TYPE_ARG2)CURL_UNCONST(y), \
(SEND_TYPE_ARG3)(z))
#elif defined(HAVE_SEND)
+#ifdef SEND_NONCONST_ARG2
#define swrite(x, y, z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
- (SEND_QUAL_ARG2 SEND_TYPE_ARG2)CURL_UNCONST(y), \
+ (SEND_TYPE_ARG2)CURL_UNCONST(y), \
(SEND_TYPE_ARG3)(z), \
(SEND_TYPE_ARG4)(SEND_4TH_ARG))
+#else
+#define swrite(x, y, z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
+ (const SEND_TYPE_ARG2)(y), \
+ (SEND_TYPE_ARG3)(z), \
+ (SEND_TYPE_ARG4)(SEND_4TH_ARG))
+#endif /* SEND_NONCONST_ARG2 */
#else /* HAVE_SEND */
#ifndef swrite
#error "Missing definition of macro swrite!"
#define RECV_TYPE_ARG4 long
#define RECV_TYPE_RETV long
-/* int send(int, const char *, int, int); */
+/* int send(int, char *, int, int); */
#define SEND_TYPE_ARG1 int
-#define SEND_QUAL_ARG2
+#define SEND_NONCONST_ARG2
#define SEND_TYPE_ARG2 char *
#define SEND_TYPE_ARG3 int
#define SEND_TYPE_RETV int
#define RECV_TYPE_RETV ssize_t
#endif
-#ifndef SEND_QUAL_ARG2
-#define SEND_QUAL_ARG2 const
-#endif
-
#ifndef SEND_TYPE_ARG1
#define SEND_TYPE_ARG1 int
#endif
$!-------------------------------------
$ if key2a .eqs. "SEND"
$ then
-$ if key2 .eqs. "SEND_QUAL_ARG2"
-$ then
-$ write tf "#ifndef ''key2'"
-$ write tf "#define ''key2' const"
-$ write tf "#endif"
-$ goto cfgh_in_loop1
-$ endif
$ if key2 .eqs. "SEND_TYPE_ARG1"
$ then
$ write tf "#ifndef ''key2'"