<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.ryara.net &#187; Computers</title>
	<atom:link href="http://blog.ryara.net/category/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ryara.net</link>
	<description></description>
	<lastBuildDate>Thu, 01 Jul 2010 10:43:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Patch for FiSH for irssi with recode</title>
		<link>http://blog.ryara.net/2010/06/14/patch-fish-irssi-with-recode/</link>
		<comments>http://blog.ryara.net/2010/06/14/patch-fish-irssi-with-recode/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 20:37:47 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/?p=154</guid>
		<description><![CDATA[This patch fixes a buffer overflow (causing a segfault) that would happen if an ISO-8859-1 sent a string consisting of many instances of a single extended character (å, ä, ö etc). The patch is against FiSH v1.0-RC5, and is only &#8230; <a href="http://blog.ryara.net/2010/06/14/patch-fish-irssi-with-recode/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This patch fixes a buffer overflow (causing a segfault) that would happen if an ISO-8859-1 sent a string consisting of many instances of a single extended character (å, ä, ö etc).</p>
<p>The patch is against FiSH v1.0-RC5, and is only relevant if you use the recode support in FiSH.</p>
<p>The side effect of this patch is that lines that would previously make irssi segfault will now be cut off (due to limits with the structure of irssi modules).</p>
<p>You can download the patch here: <a href="http://blog.ryara.net/files/FiSH-irssi.v1.00-RC5-recode-segfault-fix.patch">FiSH-irssi.v1.00-RC5-recode-segfault-fix.patch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2010/06/14/patch-fish-irssi-with-recode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>libucfg</title>
		<link>http://blog.ryara.net/2010/04/29/libucfg/</link>
		<comments>http://blog.ryara.net/2010/04/29/libucfg/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 18:07:42 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/?p=150</guid>
		<description><![CDATA[I just released libucfg, a small configuration library in ANSI C. You can find it here.]]></description>
			<content:encoded><![CDATA[<p>I just released libucfg, a small configuration library in ANSI C. You can find it <a href="http://github.com/tobbez/libucfg">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2010/04/29/libucfg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ld-preload-reverse</title>
		<link>http://blog.ryara.net/2009/12/22/ld-preload-reverse/</link>
		<comments>http://blog.ryara.net/2009/12/22/ld-preload-reverse/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 03:27:17 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/?p=141</guid>
		<description><![CDATA[I though I would post this piece of code since it has been laying around for quite a while. ld-preload-reverse is a LD_PRELOAD library that overrides the most common functions for writing text to a terminal, and reverses their output: &#8230; <a href="http://blog.ryara.net/2009/12/22/ld-preload-reverse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I though I would post this piece of code since it has been laying around for quite a while.</p>
<p>ld-preload-reverse is a LD_PRELOAD library that overrides the most common<br />
functions for writing text to a terminal, and reverses their output:</p>
<p>Looks like this:</p>
<pre>
tobbez@sagiri ~/dev/ld-preload-reverse $ LD_PRELOAD=./ld-preload-reverse.so bash
 $ esrever-daolerp-dl/ved/~ irigas@zebbotls
GNIYPOC  elifekaM  EMDAER  c.esrever-daolerp-dl  os.esrever-daolerp-dl
 $ esrever-daolerp-dl/ved/~ irigas@zebbotcat Ma elifek
os.esrever-daolerp-dl :lla

c.esrever-daolerp-dl :os.esrever-daolerp-dl
c.esrever-daolerp-dl os.esrever-daolerp-dl o- derahs- CIPf- ldl- llaW- ccg

:naelc YNOHP.
os.esrever-daolerp-dl f- mr
 $ esrever-daolerp-dl/ved/~ irigas@zebbottixe
</pre>
<p>It&#8217;s licensed under the Eiffel Forum License 2, and you can find the code <a href="http://github.com/tobbez/ld-preload-reverse/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2009/12/22/ld-preload-reverse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lighttpd rewrite rules for Symphony CMS</title>
		<link>http://blog.ryara.net/2009/12/05/lighttpd-rewrite-rules-for-symphony-cms/</link>
		<comments>http://blog.ryara.net/2009/12/05/lighttpd-rewrite-rules-for-symphony-cms/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 16:46:08 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/?p=135</guid>
		<description><![CDATA[For Symphony 2.0.6. url.rewrite-once += ( "^/symphony/favicon.ico$" => "$0", "^/symphony/symphony/(assets&#124;content&#124;lib&#124;template)/.*$" => "$0", "^/symphony/workspace/[^/]+/.*$" => "$0", "^/symphony/image/(.+\.(jpg&#124;gif&#124;jpeg&#124;png&#124;bmp))$" => "/symphony/extensions/jit_image_manipulation/lib/image.php?param=$1", "^/symphony/symphony/?(\?(.*))?$" => "/symphony/index.php?mode=administration&#038;$2", "^/symphony/symphony(/(.*/?))?(\?(.*))?$" => "/symphony/index.php?symphony-page=$1&#038;mode=administration&#038;$4", "^/symphony/([^?]*/?)(\?(.*))?$" => "/symphony/index.php?symphony-page=$1&#038;$3" ) Replace the first occurrence of &#8216;symphony&#8217; on every line with the location &#8230; <a href="http://blog.ryara.net/2009/12/05/lighttpd-rewrite-rules-for-symphony-cms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For <a href="http://symphony-cms.com/">Symphony</a>  2.0.6.</p>
<pre>url.rewrite-once += ( "^/symphony/favicon.ico$" => "$0",
                      "^/symphony/symphony/(assets|content|lib|template)/.*$" => "$0",
                      "^/symphony/workspace/[^/]+/.*$" => "$0",
                      "^/symphony/image/(.+\.(jpg|gif|jpeg|png|bmp))$" => "/symphony/extensions/jit_image_manipulation/lib/image.php?param=$1",
                      "^/symphony/symphony/?(\?(.*))?$" => "/symphony/index.php?mode=administration&#038;$2",
                      "^/symphony/symphony(/(.*/?))?(\?(.*))?$" => "/symphony/index.php?symphony-page=$1&#038;mode=administration&#038;$4",
                      "^/symphony/([^?]*/?)(\?(.*))?$" => "/symphony/index.php?symphony-page=$1&#038;$3" )
</pre>
<p>Replace the first occurrence of &#8216;symphony&#8217; on every line with the location of your Symphony installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2009/12/05/lighttpd-rewrite-rules-for-symphony-cms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ebuild for libsummer</title>
		<link>http://blog.ryara.net/2009/03/28/ebuild-for-libsummer/</link>
		<comments>http://blog.ryara.net/2009/03/28/ebuild-for-libsummer/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 17:48:36 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/?p=93</guid>
		<description><![CDATA[I wrote an ebuild for the broadcatching library libsummer, that recently released version 0.1.0: # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="A broadcatching library" SRC_URI="http://flukkost.nu/libsummer/${P}.tar.bz2" HOMEPAGE="http://wrya.net/services/trac/summer/" KEYWORDS="~x86 &#8230; <a href="http://blog.ryara.net/2009/03/28/ebuild-for-libsummer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wrote an ebuild for the broadcatching library <a href="http://wrya.net/services/trac/summer/">libsummer</a>, that recently <a href="http://wrya.net/services/mailman/pipermail/summer/2009-March/000001.html">released</a> version 0.1.0:<br />
<code>
<pre>
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

DESCRIPTION="A broadcatching library"
SRC_URI="http://flukkost.nu/libsummer/${P}.tar.bz2"
HOMEPAGE="http://wrya.net/services/trac/summer/"
KEYWORDS="~x86 ~amd64"
SLOT="0"
LICENSE="LGPL-2"
IUSE="bittorrent doc python"

DEPEND=">=dev-libs/glib-2.18.4
        >=net-libs/libsoup-2.24.3
        dev-libs/libxml2
        python? ( >=dev-python/pygobject-2.15.4 )
        bittorrent? ( >=net-libs/rb_libtorrent-0.14.1 )
        doc? ( dev-util/gtk-doc )"

RDEPEND="${DEPEND}"

RESTRICT="mirror"

src_compile() {
        econf $(use_enable bittorrent) $(use_enable python) $(use_enable doc gtk-doc) || die "econf failed"
        emake || die "emake failed"
}

src_install() {
        emake install DESTDIR="${D}" || die "Install failed"
        dodoc ChangeLog NEWS README AUTHORS
}</pre>
<p></code><br />
Download available <a href='http://blog.ryara.net/files/libsummer-0.1.0-ebuild.tar.bz2'>here</a>. To use unpack directly to your portage overlay.</p>
<p>Note: If you want the bittorrent functionaliy you will have to unmask net-libs/rb_libtorrent-0.14.1. It&#8217;s hard masked because it breaks a lot of packages relying on 0.13. Libsummer, however, was built on 0.14.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2009/03/28/ebuild-for-libsummer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mailman with lighttpd and Postfix on Gentoo</title>
		<link>http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/</link>
		<comments>http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 00:38:41 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mailman]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/?p=67</guid>
		<description><![CDATA[This post details how to setup mailman using lighttpd and postfix on gentoo. Before starting I assume that you have: * Lighttpd setup and working * Postfix setup to handle mail from one domain * MX records setup for the &#8230; <a href="http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post details how to setup mailman using lighttpd and postfix on gentoo.</p>
<p>Before starting I assume that you have:<br />
* Lighttpd setup and working<br />
* Postfix setup to handle mail from one domain<br />
* MX records setup for the subdomain you want to use for lists</p>
<p>First, we need to install mailman, but before we do that we need to make sure it uses the right UID and GID (lighttpd) instead of apache, which is the default. To do this append </p>
<p><code>
<pre>MAILMAN_CGIGID="lighttpd"
MAILMAN_CGIUID="lighttpd"
</pre>
<p></code><br />
to <strong>/etc/make.conf</strong> and then proceed to install mailman:</p>
<p><code>
<pre># emerge mailman</pre>
<p></code></p>
<p>Now it&#8217;s time to configure lighttpd. This we do by adding the following to <strong>/etc/lighttpd/lighttpd.conf</strong>:</p>
<p><code>
<pre>alias.url += (
          "/services/mailman/mailman-icons" => "/usr/lib64/mailman/icons/",
          "/services/mailman/pipermail" => "/var/lib/mailman/archives/public/",
          "/services/mailman" => "/usr/lib64/mailman/cgi-bin/",
)

$HTTP["url"] =~ "^/services/mailman" {
        cgi.assign = (
                "/admin" => "",
                "/admindb" => "",
                "/confirm" => "",
                "/create" => "",
                "/edithtml" => "",
                "/listinfo" => "",
                "/options" => "",
                "/private" => "",
                "/rmlist" => "",
                "/roster" => "",
                "/subscribe" => "")
        server.indexfiles = ("listinfo", "index.html")
}
$HTTP["url"] =~ "^/services/mailman/pipermail/" {
             dir-listing.activate = "enable"
             dir-listing.hide-dotfiles = "enable"
             server.follow-symlink = "enable"
}
</pre>
<p></code><br />
I choose not to serve mailman from a vhost, if you want to do that you&#8217;ll need to change the above accordingly. Otherwise you&#8217;ll just have to change the url matches and aliases to reflect from where you want to host mailman. You will also need to make sure that the alias and cgi modules are enabled (located at the top of <strong>lighttpd.conf</strong>).</p>
<p>The next thing to configure is mailman itself. Append the following to <strong>/etc/mailman/mm_cfg.py</strong>:</p>
<p><code>
<pre>MTA = 'Postfix'
DEFAULT_EMAIL_HOST = 'lists.example.tld'
DEFAULT_URL_HOST = 'example.tld'
DEFAULT_URL_PATTERN = 'http://%s/services/mailman/'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)
IMAGE_LOGOS = '/services/mailman/mailman-icons/' 

POSTFIX_STYLE_VIRTUAL_DOMAINS = [DEFAULT_EMAIL_HOST]

PUBLIC_ARCHIVE_URL = 'http://%(hostname)s/services/mailman/pipermail/%(listname)s'
</pre>
<p></code><br />
You should set <code>DEFAULT_EMAIL_HOST</code> to the subdomain you want your lists to use, <code>DEFAULT_URL_HOST</code> to the host from which you will serve the mailman web pages, and change <code>DEFAULT_URL_PATTERN</code>, <code>IMAGE_LOGOS</code>, <code>PUBLIC_ARCHIVE_URL</code> so that they are consistent with your settings in <strong>lighttpd.conf</strong>. The call to <code>add_virtualhost</code> is need when you change either of the <code>_HOST</code> variables like this.</p>
<p>Continuing, there is a few things we need to do as the mailman user. First install the cron jobs:</p>
<p><code>
<pre># su - mailman
mailman $ cd cron
mailman $ crontab crontab.in
mailman $ cd ..
</pre>
<p></code><br />
Then set the site password:</p>
<p><code>
<pre>mailman $ bin/mmsitepass
</pre>
<p></code><br />
The site password works instead of any other password in the mailman installation, and is used to adminstrate it.</p>
<p>Next we create the site-wide mailing list, which is needed for proper operation of mailman:</p>
<p><code>
<pre>mailman $ bin/newlist mailman
</pre>
<p></code><br />
And logout from the mailman account and continue&#8230;</p>
<p>&#8230;with configuring postfix. This is as simple as adding the following two lines to <strong>/etc/postfix/main.cf</strong>:</p>
<p><code>
<pre>virtual_alias_domains = lists.example.tld
virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman
</pre>
<p></code></p>
<p>Once again replacing lists.example.tld with the subdomain you want your lists to use.</p>
<p>Now we only need to reload postfix, start mailman and add it to the default runlevel:</p>
<p><code>
<pre># /etc/init.d/postfix reload
# /etc/init.d/mailman start
# rc-update add mailman default
</pre>
<p></code><br />
Congratulations, you should now have a working mailman install!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2009/03/27/mailman-with-lighttpd-and-postfix-on-gentoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ebuild for yubikey pam auth</title>
		<link>http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/</link>
		<comments>http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 20:09:49 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[yubikey]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/</guid>
		<description><![CDATA[(If you don&#8217;t know what a yubikey is, have a look here) So I wrote up ebuilds for yubico-pam and its dependency yubico-c-client. You can get them here. Just extract the tarball into your portage overlay and emerge pam_yubico. If &#8230; <a href="http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>(If you don&#8217;t know what a yubikey is, have a look <a href="http://yubico.com/products/yubikey/">here</a>)</p>
<p>So I wrote up ebuilds for <a href="http://code.google.com/p/yubico-pam/">yubico-pam</a> and its dependency <a href="http://code.google.com/p/yubico-c-client/">yubico-c-client</a>. You can get them <a href='http://blog.ryara.net/wp-content/uploads/2009/01/pam_yubico-ebuildstar.gz' title='Yubico PAM ebuilds'>here</a>.</p>
<p>Just extract the tarball into your portage overlay and emerge pam_yubico. If you don&#8217;t have an overlay, then just do this (as root):<br />
<code>
<pre>mkdir /usr/local/portage/
echo 'PORTDIR_OVERLAY="/usr/local/portage/"' >> /etc/make.conf
tar xvzf pam_yubico-ebuildstar.gz -C /usr/local/portage/
emerge pam_yubico
</pre>
<p></code></p>
<p>For myself I configured sshd to be able to login using either my yubikey or a normal password. I will describe how to do that &#8211; if you need some other configuration have a look at the PAM module&#8217;s site (mentioned above).</p>
<ol>
<li>You will need to get your yubico client id. The only way I know of to do this is through the <a href="https://api.yubico.com/yms/index.php">YMS</a>.
</li>
<li>Configure PAM to make ssh use the newly installed module. This by prepending <code>auth sufficient pam_yubico.so id=16 try_first_pass</code> to <code>/etc/pam.d/sshd</code>. Be sure to change 16 to the ID you aquired in step 1.
</li>
<li>Add your yubikey id to the file pam_yubico looks in, namely <code>~/.yubico/authorized_yubikeys</code>. Create the file with and add the line <code>user:yubikey_id</code>. The yubikey id is the first 12 characters from the OTPs it generates.</li>
</ol>
<p>And that&#8217;s it. You should now be able to log in over SSH using either your regular password or your yubikey.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2009/01/13/ebuild-for-yubikey-pam-auth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling SDL_gfx (2.0.17) on Visual Studio 2008 (VS9)</title>
		<link>http://blog.ryara.net/2008/07/12/compiling-sdl_gfx-2017-on-visual-studio-2008-vs9/</link>
		<comments>http://blog.ryara.net/2008/07/12/compiling-sdl_gfx-2017-on-visual-studio-2008-vs9/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 23:47:07 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/2008/07/12/compiling-sdl_gfx-2017-on-visual-studio-2008-vs9/</guid>
		<description><![CDATA[IMPORTANT: Turns out I was wrong about why SDL_gfx doesn&#8217;t compile &#8211; thanks to sweetlilmre for pointing it out. I strongly suggest using his suggestions for steps 2 and 8, whereas step 4 merely is a matter of preference. You &#8230; <a href="http://blog.ryara.net/2008/07/12/compiling-sdl_gfx-2017-on-visual-studio-2008-vs9/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><ins datetime="2008-11-01T21:33:15+00:00"><br />
<strong>IMPORTANT:</strong> Turns out I was wrong about why SDL_gfx doesn&#8217;t compile &#8211; thanks to <a href="http://blog.ryara.net/2008/07/12/compiling-sdl_gfx-2017-on-visual-studio-2008-vs9/#comment-15186">sweetlilmre</a> for pointing it out.</p>
<p>I strongly suggest using his suggestions for steps 2 and 8, whereas step 4 merely is a matter of preference. You should probably skip step 10 as well, since static_cast() is not C, but C++.<br />
</ins></p>
<p>Sadly there are no officially provided binaries for <a href="http://www.ferzkopp.net/joomla/content/view/19/14/">SDL_gfx</a> (unlike most other SDL_* libraries), and so I had to compile it myself. SDL_gfx, however has just about no documentation telling you how to do this &#8211; and the methods provided doesn&#8217;t even work.</p>
<p>Since it took me a while to get this working, so I thought I&#8217;d write it down for future reference. </p>
<p>1. Download and unpack the source package.<br />
2. Rename *.c to *.cpp. This is to solve what seems to be <a href="http://support.microsoft.com/kb/166513">this bug</a>, that supposedly was fixed in VS6.<br />
3. Extract sdlgfx.vcproj from &#8216;Other Builds\VisualC7.zip&#8217; into the source directory and open it, and go through the Conversion Wizard.<br />
4. Remove the source files from the project, and then add the *.cpp files and the *.h files to the project. This is needed because the paths in the original project file are incorrect.<br />
5. Change target to Release.<br />
6. Add SDL.lib to Linker -> Input -> Additional Dependencies in the project properties.<br />
7. Add BUILD_DLL to C/C++ -> Preprocessor -> Preprocessor Definitions.<br />
8. In SDL_gfxPrimitives, replace<br />
<code><br />
#ifdef WIN32</p>
<p>__inline long int<br />
lrint (double ftl)<br />
{<br />
  int intgr;<br />
  _asm<br />
  {<br />
    fld flt<br />
    fistp intgr<br />
  };<br />
  return intgr;<br />
}</p>
<p>#endif<br />
</code><br />
with<br />
<code><br />
#define lrint(x) (floor(x+(x>0) ? 0.5 : -0.5))<br />
</code><br />
(As per <a href="http://www.wormux.org/wiki/howto/en/compile_under_visual.php#SDL_gfx">this site</a>)<br />
9. Compile, and save the solution somewhere when asked to.<br />
10. There should be 4 compilation errors, all of which can be solved by using static_cast&lt;&gt;():<br />
SDL_rotozoom.cpp (Line 501) becomes:<br />
<code>pc = static_cast&lt;tColorRGBA*&gt;(dst->pixels);</code><br />
SDL_rotozoom.cpp (Line 657) becomes:<br />
<code>pc = static_cast&lt;tColorY*&gt;(dst->pixels);</code><br />
SDL_gfxPrimitives.cpp (Line 3105) becomes:<br />
<code>sab = sqrt(static_cast&lt;double&gt;(a2 + b2));</code><br />
SDL_gfxPrimitives.cpp (Line 4289) becomes:<br />
<code>currentFontdata = static_cast&lt;const unsigned char*&gt;(fontdata);</code><br />
11. Compile. The project should now compile correctly, and you will find sdlgfx.dll and sdlgfx.lib in the Release sub-folder of your source directory.</p>
<p>Now, this is all good, but I would really prefer either official binaries, *or* fixes to the code problems, and instructions that are actually up to date.</p>
<p><ins datetime="2008-10-14T15:42:55+00:00"><br />
Since there was interest I&#8217;ve now uploaded my binaries as well. It&#8217;s SDL_gfx-2.0.17 compiled against SDL-1.2.13, and can be downloaded <a href="http://blog.ryara.net/wp-content/uploads/2008/10/sdl_gfx-2017.zip">here</a>.<br />
</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2008/07/12/compiling-sdl_gfx-2017-on-visual-studio-2008-vs9/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Flash cycler</title>
		<link>http://blog.ryara.net/2008/06/15/flash-cycler/</link>
		<comments>http://blog.ryara.net/2008/06/15/flash-cycler/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 23:22:14 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/2008/06/15/flash-cycler/</guid>
		<description><![CDATA[Since I had a some time on my hands I decided to make a web page that cycles through a collection of flash movies and shows each one for a specified amount of time. It should work in most modern &#8230; <a href="http://blog.ryara.net/2008/06/15/flash-cycler/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since I had a some time on my hands I decided to make a web page that cycles through a collection of flash movies and shows each one for a specified amount of time.</p>
<p>It should work in most modern browsers &#8211; I&#8217;ve verified with Opera and Firefox (Internet Explorer doesn&#8217;t work).</p>
<p>You can find the source of the page <a href='http://blog.ryara.net/wp-content/uploads/2008/06/flash-cycle.zip' title='Flash cycle'>here</a>, and a sample of it in use <a href="http://wrya.net/flash-cycle.php">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2008/06/15/flash-cycler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Super smash bros: Brawl (USA) on PAL Wii</title>
		<link>http://blog.ryara.net/2008/04/17/super-smash-bros-brawl-usa-on-pal-wii/</link>
		<comments>http://blog.ryara.net/2008/04/17/super-smash-bros-brawl-usa-on-pal-wii/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 11:48:21 +0000</pubDate>
		<dc:creator>tobbez</dc:creator>
				<category><![CDATA[Computers]]></category>

		<guid isPermaLink="false">http://blog.ryara.net/2008/04/17/super-smash-bros-brawl-usa-on-pal-wii/</guid>
		<description><![CDATA[I finally got SSBB working, and here&#8217;s how. But let&#8217;s start with what does NOT work. First, my setup: PAL Wii with latest firmware (Bought on the release date) WiiKey (Firmware 1.9s) Try 1 (No go): Enabling update blocker on &#8230; <a href="http://blog.ryara.net/2008/04/17/super-smash-bros-brawl-usa-on-pal-wii/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I finally got SSBB working, and here&#8217;s how. But let&#8217;s start with what does NOT work.</p>
<p>First, my setup:<br />
PAL Wii with latest firmware (Bought on the release date)<br />
WiiKey (Firmware 1.9s)</p>
<p>Try 1 (No go):<br />
Enabling update blocker on the WiiKey:<br />
Doesn&#8217;t work, from reading a litte on the net I found out that you have to enable dev mode as well.</p>
<p>Try 2 (A bit better):<br />
Enabled dev mode as well as the update blocker on the WiiKey. The disc loads correctly, but when you try to start it you just get a black screen.</p>
<p>Try 3 (Almost there):<br />
Got a tip to try it in 50hz mode. Did that, and&#8230; it works. However the game runs awfully slow, and you get audio artefacts from some sounds which means it&#8217;s not really playable.</p>
<p>Try 4 (Success!):<br />
Decided to try FreeLoader for Wii. I disabled update blocker and dev mode on the WiiKey, and changed back to 60hz.<br />
First I went to the disc screen and inserted the FreeLoader disc and waited for it to load (you may see some graphic artefacts during this time). Then I ejected the FreeLoader disc and inserted my SMBB disc and started it. And it worked fine.</p>
<p>If you get a white screen saying the disc can&#8217;t be read after the &#8220;Loading&#8230;&#8221; message you&#8217;re propably suffering from a bad burn.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ryara.net/2008/04/17/super-smash-bros-brawl-usa-on-pal-wii/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
