ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Happy to enlighten you.... I started invoking its name after another poster, in asking a question, began his question in the name of Allah....I suspect there's a certain amount of unintentional bias here, because nobody seems to be disciplined because of including (Christian) Bible quotations in his signature.
It is nice that you bothered to explain I have seen the threads of both the posters, one of them is our Kenny (the star of /General )
IMHO you are missing a point here.
Writing religious statements is not a problem but writing them on the start of the posts IS, simply because the reader is forced to read them. But if you put those statements in your signature, people can easily ignore it, so what Kenny has done is not against the rules and no one would have complained if the other Muslim poster would have done the same but instead he used to write "In name of Allah" at the beginning of every post of his.
e.g Me: I don't believe in Islam, I am a Hindu girl, but if I ever answered or read his threads I would definitely find it irritating to read about "Allah" all the time and his threads would be ignored by me!!
Quote:
Originally Posted by wje_lq
I raised the issue with the moderator, asking whether we were going to be consistent, and got no answer.
Because you wrote a visitor message to him, perhaps you don't know that no mail notification gets sent for visitor messages and moderator may have easily missed it. Consider sending a PM to Tinkster or XavierP, both of them are very active and friendly too!
Quote:
Originally Posted by wje_lq
So I'm using this greeting to establish a precedent. Maybe they'll discipline me with ten lashes with a wet piece of spaghetti or something.
No offense intended but I personally find that monster statement irritating, (I actually didn't know that it was related to Christianity, so I thought you were trying to make fun of me) I am the OP of this thread so I don't have any choice other than reading that statement every time you post since I need help here, I would have ignored your post had it been the other way round!
How about putting that statement in your signature Try that, and if anyone complains, feel free to discipline me with ten lashes
Last edited by Aquarius_Girl; 12-14-2010 at 09:30 PM.
Reason: added statements
Here's a test, if it's in fact your computer: Change that line in string.h so it says:
Code:
exxtern int strnicmp(const char *, const char *, __kernel_size_t);
That's right. Put an extra x in there. If your code still compiles, then this line was excluded by conditional compilation directives, so the compiler didn't care about that extra x.
There are a lot of string.h files scattered everywhere, the one I modified is highlighted here! and nothing happened and then I modified strcmp fx there too but still the code got compiled properly?? I'll try that again today, Dumb question: How to find which one is currently being used?
There are a lot of string.h files scattered everywhere, the one I modified is highlighted here! and nothing happened and then I modified strcmp fx there too but still the code got compiled properly??
Remember, these lines at the beginning of the file:
Code:
/* We don't want strings.h stuff being used by user stuff by accident */
#ifndef __KERNEL__
#include <string.h>
#else
... cause most of the rest of the file to be ignored. That's why your code compiled the same even after you damaged part of the file for test purposes.
Beyond that, could it be that this file is not string.h, but instead strings.h? The comment at the beginning of it seems to imply so.
Excuse me while I go have spaghetti for dinner. :)
You will find that the posix commands generally have man pages, which will get you going pretty quickly.
For example (in OpenSUSE) man strcmp gets hits, while man stricmp doesn't.
The string library that is getting used will be the one you include, or it will be included from an include that you included. If you use grep, you will learn a lot about where your function is defined.
For instance, working from /usr/include, grep strcmp * will return a couple of lines, only one of which defines strcmp while grep -r strcmp * will take you through the entire directory tree and give lots of other returns.
Trying that with stricmp returns...nothing.
Also, the flying spaghetti monster isn't associated with christianity. It is intended to mock christianity, specifically with regard to the insistence of some christian fundamentalists that "creationism" (a literal interpretation of the bible, which states that god created the universe in 6 days) is science just like evolution, and should be taught in science class just as evolution is taught.
For instance, working from /usr/include, grep strcmp * will return a couple of lines, only one of which defines strcmp while grep -r strcmp * will take you through the entire directory tree and give lots of other returns.
Trying that with stricmp returns...nothing.
In debian, it depends on which packages you have installed:
There are a lot of string.h files scattered everywhere, the one I modified is highlighted here! and nothing happened and then I modified strcmp fx there too but still the code got compiled properly?? I'll try that again today, Dumb question: How to find which one is currently being used?
You can have a look at the preprocessed file to see which file is getting included
Instead of making the exe with gcc, try this command instead to see the preprocessed output. I used cpp[c pre processor] command here
Code:
#cpp test.c > test.cpp
Search inside this test.cpp to see which is getting included..
I suspect there's a certain amount of unintentional bias here, because nobody seems to be disciplined because of including (Christian) Bible quotations in his signature.
All includes for normal user-space C programs come from /usr/include
Any include files from anywhere else are not covered by POSIX / GNU C, generally speaking. When you use an include file from, say, kernel - you better be writing a kernel module. If not, the linker might not find symbols you're trying to use (such as stricmp, in this case). When you write user-space programs, you're linked against the C library. When you write kernel code, you're linked against the kernel. The two are not inter-mingled (although, for convenience, many kernel utility functions share a name with their posix counterparts).
I'd suggest reading up on linkers, loaders, and libraries. Google will help with that.
That was helpful, I tried that and it was visible that the /usr/include/string.h was getting included.
In post 18, I had randomly modified a string.h without knowing whether it was getting included or not, that's why it didn't have any effect on the compilation of the program!
and I checked that function "stricmp" was no where in the string.h, through the grep way mentioned by Jim.
Besides there are some other functions too (I don't remember their names right now) which do not have "CONFIRMING TO" section in their man pages! I wonder what is the reason behind the discrimination of these functions??
Thanks to ALL the posters of this thread for giving enlightening inputs!
When you use an include file from, say, kernel - you better be writing a kernel module.
This thread was marked SOLVED a long back ago, and today I was compiling a hello world kernel module and that resulted in the errors w.r.t some string.h files??? WTF? Looking carefully at the path of the string.h in the error message, I noticed it to be "/usr/src/linux-2.6.31.5-0.1/include/linux/string.h", Aaah, this is the same file I modified in Post number: 18 as a test but didn't revert back
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.