{"id":411,"date":"2005-05-24T15:30:09","date_gmt":"2005-05-24T05:30:09","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=411"},"modified":"2005-05-24T15:30:09","modified_gmt":"2005-05-24T05:30:09","slug":"dont-you-just-love-being-compatible","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2005\/05\/24\/dont-you-just-love-being-compatible\/","title":{"rendered":"Don&#8217;t you just love being compatible?"},"content":{"rendered":"<p><code>\t\/* Force server down. kill all connections and threads and exit *\/<\/p>\n<p>#if defined(OS2) || defined(__NETWARE__)<br \/>\nextern \"C\" void kill_server(int sig_ptr)<br \/>\n#define RETURN_FROM_KILL_SERVER DBUG_VOID_RETURN<br \/>\n#elif !defined(__WIN__)<br \/>\nstatic void *kill_server(void *sig_ptr)<br \/>\n#define RETURN_FROM_KILL_SERVER DBUG_RETURN(0)<br \/>\n#else<br \/>\nstatic void __cdecl kill_server(int sig_ptr)<br \/>\n#define RETURN_FROM_KILL_SERVER DBUG_VOID_RETURN<br \/>\n#endif<br \/>\n{<br \/>\n  DBUG_ENTER(\"kill_server\");<\/code><\/p>\n<p>(from sql\/mysqld.cc)<\/p>\n<p>There just has to be a better way to do this&#8230;.<\/p>\n<p>maybe we need a kill_server which is platform defined (e.g. in a mythical win32.cc, netware.cc or generic_sane_unix.cc) and the generic _kill_server in mysqld.cc? possibly some variation of&#8230; some platforms seem to do strange things.<\/p>\n<p>i don&#8217;t know. it just doesn&#8217;t look that clean to me&#8230;. maybe i need more coffee.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* Force server down. kill all connections and threads and exit *\/ #if defined(OS2) || defined(__NETWARE__) extern &#8220;C&#8221; void kill_server(int sig_ptr) #define RETURN_FROM_KILL_SERVER DBUG_VOID_RETURN #elif !defined(__WIN__) static void *kill_server(void *sig_ptr) #define RETURN_FROM_KILL_SERVER DBUG_RETURN(0) #else static void __cdecl kill_server(int sig_ptr) #define &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2005\/05\/24\/dont-you-just-love-being-compatible\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[14],"tags":[],"class_list":["post-411","post","type-post","status-publish","format-standard","hentry","category-mysql"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-6D","jetpack-related-posts":[{"id":4532,"url":"https:\/\/www.flamingspork.com\/blog\/2019\/12\/31\/speeding-up-blackbird-boot-the-sbe\/","url_meta":{"origin":411,"position":0},"title":"Speeding up Blackbird boot: the SBE","author":"Stewart Smith","date":"2019-12-31","format":false,"excerpt":"The Self Boot Engine (SBE) is a small embedded PPE42 core inside the POWER9 CPU which has the unenvious job of getting a single POWER9 core ready enough to start executing instructions out of L3 cache, and poking some instructions into said cache for the core to start executing. It's\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":5048,"url":"https:\/\/www.flamingspork.com\/blog\/2026\/11\/06\/double-width-atomics-arent-atomic-if-using-zig-cc-to-build-c-c-code\/","url_meta":{"origin":411,"position":1},"title":"Double-width atomics aren&#8217;t atomic if using &#8220;zig cc&#8221; to build C\/C++ code","author":"Stewart Smith","date":"2026-11-06","format":false,"excerpt":"The Zig project heavily advocates the use case of using its toolchain to build C\/C++ code, \"Use Zig as a zero-dependency, drop-in C\/C++ compiler that supports cross-compilation out-of-the-box.\u201d (Zig home page https:\/\/ziglang.org\/ fetched 2026-10-21). Back in 2020, the announcement from Zig's creator was \"zig cc: a Powerful Drop-In Replacement for\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":101,"url":"https:\/\/www.flamingspork.com\/blog\/2003\/06\/04\/finally-fixed-it\/","url_meta":{"origin":411,"position":2},"title":"finally! fixed it!","author":"Stewart Smith","date":"2003-06-04","format":false,"excerpt":"From: Stewart Smith Date: Wed Jun 4, 2003 3:56:09 PM Australia\/Melbourne To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, David Woodhouse , Stewart Smith Subject: [PATCH] fixed: CRC32=y && 8193TOO=m unresolved symbols Linus, please apply - this fixes unresolved symbols when CONFIG_CRC32=y and CONFIG_8139TOO=m (it also appeared on some other ethernet device drivers).\u2026","rel":"","context":"In &quot;linux-kernel&quot;","block_context":{"text":"linux-kernel","link":"https:\/\/www.flamingspork.com\/blog\/category\/linux-kernel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1056,"url":"https:\/\/www.flamingspork.com\/blog\/2008\/03\/28\/dear-lazyweb-autoconf-and-define-have_-0\/","url_meta":{"origin":411,"position":3},"title":"Dear LazyWeb, autoconf and #define HAVE_ 0","author":"Stewart Smith","date":"2008-03-28","format":false,"excerpt":"How do I make an existing project (let's say, MySQL) switch from generating a config.h that has #undef HAVE_FOO to one that generates #define HAVE_FOO 0 instead? Why? Well, here's why: Testing for features should be done by including \"config.h\" and using #if HAVE_<feature>. Use of #if (rather than #ifdef)\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1361,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/01\/22\/what-the-fuck-were-they-smoking\/","url_meta":{"origin":411,"position":4},"title":"what the fuck were they smoking","author":"Stewart Smith","date":"2009-01-22","format":false,"excerpt":"\/* Function to free dboptions hash element *\/ extern \"C\" void free_dbopt(void *dbopt); void free_dbopt(void *dbopt) { free((unsigned char*) dbopt); }","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":925,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/11\/14\/better-disk-allocation-with-mythtv-and-xfs\/","url_meta":{"origin":411,"position":5},"title":"Better disk allocation with MythTV and XFS","author":"Stewart Smith","date":"2007-11-14","format":false,"excerpt":"Running MythTV on XFS? Noticed that all your recordings end up rather fragmented? (use xfs_bmap to find out) Well, the culprit is MythTV not being too nice to the file system. Good news is, it's rather fixable. From the MythTV source code, edit libs\/libmythtv\/ThreadedFileWrite.cpp and look for the following: void\u2026","rel":"","context":"In &quot;mythtv&quot;","block_context":{"text":"mythtv","link":"https:\/\/www.flamingspork.com\/blog\/category\/mythtv\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=411"}],"version-history":[{"count":0,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/411\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}