<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/examples/network/common.c, branch ethomson/git_obj</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>examples: network: fix Win32 linking errors due to getline</title>
<updated>2017-11-06T14:48:50+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-11-06T12:47:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=bf15dbf6cf19146082c1245e9db4016d773dbe7e'/>
<id>bf15dbf6cf19146082c1245e9db4016d773dbe7e</id>
<content type='text'>
The getline(3) function call is not part of ISO C and, most importantly,
it is not implemented on Microsoft Windows platforms. As our networking
example code makes use of getline, this breaks builds on MSVC and MinGW.
As this code wasn't built prior to the previous commit, this was never
noticed.

Fix the error by instead implementing a `readline` function, which
simply reads the password from stdin until it reads a newline
character.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The getline(3) function call is not part of ISO C and, most importantly,
it is not implemented on Microsoft Windows platforms. As our networking
example code makes use of getline, this breaks builds on MSVC and MinGW.
As this code wasn't built prior to the previous commit, this was never
noticed.

Fix the error by instead implementing a `readline` function, which
simply reads the password from stdin until it reads a newline
character.
</pre>
</div>
</content>
</entry>
<entry>
<title>examples: network: refactor credentials callback</title>
<updated>2017-05-15T05:34:03+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-05-03T10:25:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f0ca00e013885479228c4f076989566a2b77221b'/>
<id>f0ca00e013885479228c4f076989566a2b77221b</id>
<content type='text'>
The credentials callback reads the username and password via scanf into
fixed-length arrays. While these are simply examples and as such not as
interesting, the unchecked return value of scanf causes GCC to emit
warnings. So while we're busy to shut up GCC, we also fix the possible
overflow of scanf by using getline instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The credentials callback reads the username and password via scanf into
fixed-length arrays. While these are simply examples and as such not as
interesting, the unchecked return value of scanf causes GCC to emit
warnings. So while we're busy to shut up GCC, we also fix the possible
overflow of scanf by using getline instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Adding credentials callback to ls-remote and fetch too.</title>
<updated>2013-09-01T17:00:16+00:00</updated>
<author>
<name>Krzysztof Adamski</name>
<email>k@japko.eu</email>
</author>
<published>2013-09-01T16:35:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=255836ddac05418f6bb2d68d27f5ff290669e2a9'/>
<id>255836ddac05418f6bb2d68d27f5ff290669e2a9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
