What is meant by "c" being portable
Printable View
What is meant by "c" being portable
Relating to or being software that can run on two or more kinds of computers or with two or more kinds of operating systems
thanks
as Fidato already said, C is a programming language which is used (and useable) on almost every OS, therefor it is portable.
however, there are specific functions in C that are specific for windows or specific for linux, this is why a virus/trojan doesn't work on both windows AND linux, for instance the network functions (to create a socket), are different in windows and in linux, and without networkfunctions a virus/trojan wouldn't be much of a virus/trojan, would it?!
and since most virusses are written for windows, you don't have to be afraid that they will work on linux too, that's one of the reasons why most security-people run there computers on linux.
i know this isn't exactly what you asked, but i thought this would explain things...
Actually your wrong. But since I am not in the mood to explain it all to you. I will link to you.Quote:
however, there are specific functions in C that are specific for windows or specific for linux, this is why a virus/trojan doesn't work on both windows AND linux, for instance the network functions (to create a socket), are different in windows and in linux, and without networkfunctions a virus/trojan wouldn't be much of a virus/trojan, would it?!
http://www.linuxquestions.org/questi...5&pagenumber=1
You do know that there are linux viruses right?Quote:
and since most virusses are written for windows, you don't have to be afraid that they will work on linux too, that's one of the reasons why most security-people run there computers on linux.
i've read the thread, but this still doesn't say that you can use the winsock() funtion in linux C... and as far as my knowledge goes, there isn't another way to use sockets in windows..(but perhaps i'm wrong, and if i'm wrong, i would like to know more about this :D)Quote:
Actually your wrong. But since I am not in the mood to explain it all to you. I will link to you.
http://www.linuxquestions.org/quest...mp;pagenumber=1
like i said MOST virusses, yes i do know there are linux virusses, why else would there be antvirus software for linux :)Quote:
You do know that there are linux viruses right?
To my knowledge there is no AV software that scans linux machines for viruses. All I have seen is AV software that runs on linux that checks all the other win boxes on a network or scans emails for viruses (mailserver).Quote:
why else would there be antvirus software for linux
There's ClamAV. It runs on Linux and checks Linux filesystems.
Good find! Now my knowledge has increased :D
there should be another one too, i've read about it recently, but i forgot the name, but very soon (one of these days) i'm going to install gentoo on my notebook (dual boot with XP pro sp2) and i'm going to install AV on it when it is ready. :D
As Lepeicaun said, it is were you can take C code written for one operating system and and modify it so it can run on another operating system.Quote:
(Example: Taking a source code written for Windows, and modify it so it will work on the Mac.)
For example, if we were to look at this code
This application would run fine on a Windows/Dos system, but when I compile and run the same code on my Slackware system I would get an error because the command "cls" is not a valid Bash command. In order to get this code to work on Linux I would need to modify it (port it) to Linux and change the system("cls"); part to system("clear"); as shown belowCode:
void main()
{
system("cls");
}
and then it would work without problems on Linux. I hope this explains it. I more then likely confused you. I would do a quick search on Google and look up the term "Porting" and "Port Code" and you should find a definition you should understand.Code:
void main()
{
system("clear");
}
-- {Jellybelly}
Kaspersky Anti-Virus. They have it for linux servers, primarily Mail and File servers, but it can be configured to scan the entire machine for viruses.Quote:
Originally posted here by The Grunt
To my knowledge there is no AV software that scans linux machines for viruses. All I have seen is AV software that runs on linux that checks all the other win boxes on a network or scans emails for viruses (mailserver).
Oh, and you can also write portable C in mind. For almost any language being ported to multiple platforms this has to be kept in mind -- even with Java, although Java has tools that way ease portability.