LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-10-2005, 04:00 AM   #1
nkshirsagar
LQ Newbie
 
Registered: Nov 2004
Posts: 22

Rep: Reputation: 0
ifdef for suse??


Hi,

Is there any compiler directive I could use to get some code to specifically compile for suse?

like an #ifdef __SUSE__ ?? or something?

-nikhil.
 
Old 01-10-2005, 08:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
nope. the name of the distro is at such a totally different level to C code it's unreal.. you really should be able to find a better solution than wanting to do that.
 
Old 01-10-2005, 11:12 PM   #3
nkshirsagar
LQ Newbie
 
Registered: Nov 2004
Posts: 22

Original Poster
Rep: Reputation: 0
hmmmm

I need it because ...

my code crashes only on suse if LANG or LC_ALL are not set ... (they're NULL) ...

for some reason, on suse, they're null by default..

i need to set them depending on whether the platform is suse.. (and not for other flavours of linux).. thats why i want some suse directive to have those statemenets compile only on suse..

any better solution than doing a strstr after fopen(etc/issue) ??


-nikhil.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual-boot WinXP / Suse 9, keeps crashing after installing Suse MagNiTek Linux - General 2 07-08-2005 12:39 PM
SuSE: Dlink Access Point: How to let SuSE 9.1 box fetch the webpages for wlan request hansschmucker Linux - Wireless Networking 3 01-06-2005 12:02 PM
Compiling programmes: How to use #ifdef? asciimonster Linux - General 1 12-13-2004 01:35 PM
help with #ifdef #undef etc tuxfood Programming 3 06-29-2004 08:12 AM
SUSE Security Announcement - Linux Kernel (SuSE-SA:2004:009) ima Linux - Security 0 04-19-2004 08:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 09:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration