home | list info | list archive | date index | thread index

[OCLUG-Tech] Linux platform differences

I've been developing in Linux for only a short time and I have noticed
that Linux platforms are not consistent. Let me explain.

I recently 'inherited' a Linux application to support. The app
compiles in it's Red Hat environment no problem. But I need to compile
the application using a Windows based gcc compiler in order to utilize
a static code checker in Windows that we use in house. To do that I
fully installed Cygwin (latest version). When I tried compiling the
Linux app under Cygwin there were some header files called that were
not where the app expected them to be. For instance <linux/ioctl.h>
was actually in <sys/ioctl.h>. There were several other header files
having the same problem.

This is not just under Cygwin that I find this. I noticed this
difference early on with an Ubuntu version that had an older Linux
kernel version. When I upgraded Ubuntu/Linux kernel, I found this
difference as well and I had to made the appropriate changes in the
source code.

Can someone explain the difference, and why it exists? And is there a
good reason to have this difference which so far seems quite
inconvenient. Also, what other differences are there that I may not be
aware of yet.

As a side bar question, the app I'm porting to Cygwin uses a utility
called 'ethtool'. Cygwin doesn't have this utility, but the RH distro
the app is coming from did. I'm assuming the previous designer added
it to RH. So I'm trying to compile and install 'ethtool' into Cygwin
but it's looking for the Linux directory under '/usr/include' for some
headers which of course doesn't exist under Cygwin, and './configure'
doesn't pick up the fact that it doesn't exist. So what can I do in
this case? Just change the source?

Appreciate your input.

thanx
/carl h.

message navigation