<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.com/gvanem">Gisle Vanem</a>
started a new
discussion on <a href="https://gitlab.com/gnutls/gnutls/-/commit/bfd453f39cb6126e561000a711264b2535eefc36#note_743634651">lib/system/sockets.c</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="79" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
79
</td>
<td class="new_line diff-line-num" data-linenumber="79" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
79
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC79" class="line" lang="c"><span class="p">{</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="80" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
80
</td>
<td class="new_line diff-line-num" data-linenumber="80" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
80
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC80" class="line" lang="c">     <span class="k" style="font-weight: 600;">return</span> <span class="n" style="color: #333;">send</span><span class="p">(</span><span class="n" style="color: #333;">GNUTLS_POINTER_TO_INT</span><span class="p">(</span><span class="n" style="color: #333;">ptr</span><span class="p">),</span> <span class="n" style="color: #333;">data</span><span class="p">,</span> <span class="n" style="color: #333;">data_size</span><span class="p">,</span> <span class="mi" style="color: #099;">0</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="81" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
81
</td>
<td class="new_line diff-line-num" data-linenumber="81" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
81
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC81" class="line" lang="c"><span class="p">}</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
82
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC82" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="83" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
83
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC83" class="line" lang="c"><span class="kt" style="color: #458; font-weight: 600;">ssize_t</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="84" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
84
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC84" class="line" lang="c"><span class="nf" style="color: #900; font-weight: 600;">system_writev</span><span class="p">(</span><span class="n" style="color: #333;">gnutls_transport_ptr_t</span> <span class="n" style="color: #333;">ptr</span><span class="p">,</span> <span class="k" style="font-weight: 600;">const</span> <span class="n" style="color: #333;">giovec_t</span> <span class="o" style="font-weight: 600;">*</span> <span class="n" style="color: #333;">iovec</span><span class="p">,</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="85" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
85
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC85" class="line" lang="c">           <span class="kt" style="color: #458; font-weight: 600;">int</span> <span class="n" style="color: #333;">iovec_cnt</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="86" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
86
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC86" class="line" lang="c"><span class="p">{</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="82" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="87" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
87
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC87" class="line" lang="c">     <span class="n" style="color: #333;">WSABUF</span> <span class="n" style="color: #333;">bufs</span><span class="p">[</span><span class="n" style="color: #333;">iovec_cnt</span><span class="p">];</span></span>
</pre>
</td>
</tr>

</table>
<div style="">
<p dir="auto">This does not work with MSVC. Error:</p>
<pre class="code highlight js-syntax-highlight language-c" lang="c" v-pre="true" style="background-color: #fff; font-family: monospace; font-size: 90%; -premailer-cellpadding: 0; -premailer-cellspacing: 0; -premailer-width: 100%; margin: 0;"><code><span id="LC1" class="line" lang="c"><span class="n" style="color: #333;">system</span><span class="o" style="font-weight: 600;">/</span><span class="n" style="color: #333;">sockets</span><span class="p">.</span><span class="n" style="color: #333;">c</span><span class="p">(</span><span class="mi" style="color: #099;">87</span><span class="p">)</span><span class="o" style="font-weight: 600;">:</span> <span class="n" style="color: #333;">error</span> <span class="n" style="color: #333;">C2057</span><span class="o" style="font-weight: 600;">:</span> <span class="n" style="color: #333;">expected</span> <span class="n" style="color: #333;">constant</span> <span class="n" style="color: #333;">expression</span></span>
<span id="LC2" class="line" lang="c"><span class="n" style="color: #333;">system</span><span class="o" style="font-weight: 600;">/</span><span class="n" style="color: #333;">sockets</span><span class="p">.</span><span class="n" style="color: #333;">c</span><span class="p">(</span><span class="mi" style="color: #099;">87</span><span class="p">)</span><span class="o" style="font-weight: 600;">:</span> <span class="n" style="color: #333;">error</span> <span class="n" style="color: #333;">C2466</span><span class="o" style="font-weight: 600;">:</span> <span class="n" style="color: #333;">cannot</span> <span class="n" style="color: #333;">allocate</span> <span class="n" style="color: #333;">an</span> <span class="n" style="color: #333;">array</span> <span class="n" style="color: #333;">of</span> <span class="n" style="color: #333;">constant</span> <span class="n" style="color: #333;">size</span> <span class="mi" style="color: #099;">0</span></span>
<span id="LC3" class="line" lang="c"><span class="n" style="color: #333;">system</span><span class="o" style="font-weight: 600;">/</span><span class="n" style="color: #333;">sockets</span><span class="p">.</span><span class="n" style="color: #333;">c</span><span class="p">(</span><span class="mi" style="color: #099;">87</span><span class="p">)</span><span class="o" style="font-weight: 600;">:</span> <span class="n" style="color: #333;">error</span> <span class="n" style="color: #333;">C2133</span><span class="o" style="font-weight: 600;">:</span> <span class="err" style="color: #a61717; background-color: #e3d2d2;">'</span><span class="n" style="color: #333;">bufs</span><span class="err" style="color: #a61717; background-color: #e3d2d2;">'</span><span class="o" style="font-weight: 600;">:</span> <span class="n" style="color: #333;">unknown</span> <span class="n" style="color: #333;">size</span></span></code></pre>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/commit/bfd453f39cb6126e561000a711264b2535eefc36#note_743634651">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/gnutls/gnutls/-/commit/bfd453f39cb6126e561000a711264b2535eefc36#note_743634651"}}</script>


</p>
</div>
</body>
</html>