473,854 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

code portability

My question is more generic, but it involves what I consider ANSI standard C
and portability.

I happen to be a system admin for multiple platforms and as such a lot of
the applications that my users request are a part of the OpenSource
community. Many if not most of those applications strongly require the
presence of the GNU compiling suite to work properly. My assumption is that
this is due to the author/s creating the applications with the GNU suite.
Many of the tools requested/required are GNU replacements for make,
configure, the loader, and lastly the C compiler itself. Where I'm going
with this is, has the OpenSource community as a whole committed itself to at
the very least encouraging its contributing members to conform to ANSI
standards of programming?

My concern is that as an admin I am sometimes compelled to port these
applications to multiple platforms running the same OS and as the user
community becomes more and more insistent on OpenSource applications will
gotcha's appear due to lack of portability in coding? I fully realize that
independent developers may or may not conform to standards, but again is it
at least encouraged?

11.32 of the FAQ seemed to at least outline the crux of what I am asking.
If I loaded up my home machine to the gills will all open source compiler
applications (gcc, imake, autoconfig, etc....) would my applications that I
compile and link and load conform?
Aug 1 '06
239 10375
Ian Collins wrote:
This year I have mentioned TDD in two threads here, both times he or she
has piled in with a personal attack. The first time on a thread that
was weeks old, no way that could be considered topicality guidance.
It gets worse when someone attacks you over a topic known to attract
negative attention. The you get a lot of empty 'me-too's.

However, I thought you knew better than to engage Frederick
Premature-Optimization Gotham. His game is forcing you to admit your code
must obey business constraints, so he can brag that he is free to play with
only one aspect of engineering, while neglecting others.

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!
Aug 9 '06 #201
Phlip posted:
However, I thought you knew better than to engage Frederick
Premature-Optimization Gotham.

Amusing.

His game is forcing you to admit your code must obey business
constraints, so he can brag that he is free to play with only one aspect
of engineering, while neglecting others.

Such as business?

My code is fully-portable, Standard-compliant and efficient -- that's all I
need.

--

Frederick Gotham
Aug 9 '06 #202
In article <87************ @mail.comRichar d <rg****@gmail.c omwrites:
....
And what you think has no relevance in the real world : MOST european
based languages are adjective noun order.
*Germanic* european based languages. (I do not know about the Slavic
languages.)
--
dik t. winter, cwi, kruislaan 413, 1098 sj amsterdam, nederland, +31205924131
home: bovenover 215, 1025 jn amsterdam, nederland; http://www.cwi.nl/~dik/
Aug 9 '06 #203

"Frederick Gotham" <fg*******@SPAM .comwrote in message
news:C0******** ***********@new s.indigo.ie...
Eigenvector posted:
>Man I don't know where you work, but every single programmer I manage on
my system codes by the methods outlined by the customer - NOT what they
feel is appropriate. If the customer wants his int variables to be
named using some arcane mathematical formula then so be it, if they want
the int variables to be a,b,c,d,e,f,... then so be it. The coding
standard is determined by the project and the customer, never the coder
- at least in my realm.


More of a topic for comp.lang.c.bus iness.

I don't work as a programmer -- I have no customer and no boss.

--

Frederick Gotham
So then I question your devotion to your style and your confidence in its
effectiveness. If you have never worked in the industry nor have had to
satisfy a customer or their requirements I don't see how you can make
judgements on your style vs. what the undoubted experts here in this forum
promote.

Personally if I do something one way in a non-professional environment, but
a bunch of people take me aside and provide example after example of why my
method is not really in line with normal practices - I take their
suggestions to heart. You don't appear to be doing that to my untrained
eyes.

Do as you wish, I just don't care having said my peace. I agree to not
agree with you.
Aug 10 '06 #204
Dik T. Winter said:
In article <87************ @mail.comRichar d <rg****@gmail.c omwrites:
...
And what you think has no relevance in the real world : MOST european
based languages are adjective noun order.

*Germanic* european based languages. (I do not know about the Slavic
languages.)
In Polish, which is of course a Slavic language, it varies (just as it does
in English proper!).

For example: in "otwartym terenie" - "open terrain" - the adjective comes
first, and this is commonplace. But "dzien otwarty" - "open day" - places
the adjective after the noun.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Aug 10 '06 #205
Keith Thompson <ks***@mib.orgw rote:
Frederick Gotham <fg*******@SPAM .comwrites:
I wouldn't have thought people would be so puzzled by the simple ordering
of words.

I be by have ordering people puzzled simple so the thought would
wouldn't of words.
Oh, now you're just being dense for the sake of it. Get a grip, ok?

Richard
Aug 10 '06 #206
"Frederick Gotham" <fg*******@SPAM .comwrote in message
news:vy******** ***********@new s.indigo.ie...
No, I prefer:

<type<type specifiers<cons t<volatile<stat ic/extern<inline>
<name>

const and volatile *are* type specifiers, afaicr.
"name" might include pointer-ness, or function-ness, or array-ness.
Something

It also has to include any pointer-ness of the type as well as of the
function. If you return a const char * from a static function, you'd end up
writing:

char const static *func(args)

because there's no way to pull the * left of the "static". You have split
the type up, so that you have to read the whole declaration to realise the
function returns a "const char *" and not just a "const char".

I'm not saying you shouldn't do it, nor that it's poor style or any weasel
words like that. I'm just saying it confuses me, and it'll probably confuse
others too.

Why have you chosen this style? Please tell me any benefits it could offer.

--

Philip Potter

Aug 10 '06 #207
"Frederick Gotham" <fg*******@SPAM .comwrote in message
news:FH******** ***********@new s.indigo.ie...
If they need the extra time to figure it out, then they probably can't
help
me anyway. If you're expecting someone to say:

a big, yellow, smooth, painted wall

and instead, they say:

a smooth, yellow, painted, big wall

, then will you be confused, and will it take you longer to decipher the
sentence?
False comparison. In the above case, each specifier of "wall" is of an
equivalent type - an adjective. In declarations, there are some specifiers
which describe the function, and some which describe its return value.
Mixing them together doesn't confuse the compiler, but it serves no purpose
towards making it any clearer for people.

--

Philip Potter

Aug 10 '06 #208
"Phlip" <ph******@yahoo .comwrote:
Ian Collins wrote:
This year I have mentioned TDD in two threads here, both times he or she
has piled in with a personal attack. The first time on a thread that
was weeks old, no way that could be considered topicality guidance.

It gets worse when someone attacks you over a topic known to attract
negative attention. The you get a lot of empty 'me-too's.
That's as may be, but it's still not as bad as when someone comes in to
fight his personal feuds and advocacy battles where they're completely
off-topic. So please don't.

Richard
Aug 10 '06 #209
"Philip Potter" <ph***********@ xilinx.comwrote :
"Frederick Gotham" <fg*******@SPAM .comwrote in message
news:hy******** ***********@new s.indigo.ie...
Consider an internal linkage, inline function which returns a const pointer
to a const int. Each of the following are easily readable to me:

inline static const int * const Func1(void) {}

static inline int const* const Func2() {}

const static int inline *const Func3(void) {}

int const inline static* const Func4() {}

Good for you if you can read it. I have no objection to Func1 or Func2,
except that Func2 is poor-style C89 (it doesn't specify arguments).

Func3 and Func4 are less readable to me.
And yet, you will encounter all of them, and worse, in the wild. You may
not like them, but you'll have to be able to work with them.

Richard
Aug 10 '06 #210

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1848
by: Lefevre | last post by:
Hello. I recently discovered that this kind of code : | struct Object | { | string f() { return string("Toto"); } | } | | int main( ... )
0
9901
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10685
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10763
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10371
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9518
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5750
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5942
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4563
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.