Flash Gordon said:
It does not work on all the systems I have programmed so it certainly is
specific to a selection of systems not general to all systems.
Nice try...well, not really, I give that a "4" on the Dodge-O-Meter...
I've no idea how many implementations claim POSIX compliance, nor how
many actually achieve it (modulo bugs). However, I do know that many
compilers, when correctly prodded, are compliant to a version of the ISO
C standard apart from the odd bug.
I very carefully (and sneakily) used the term "anal-restrictive" as opposed
to the more common term "anal-retentive"...as part of the "standards wars"
in Unix in years past there was at least one period where there was
a certain effort made to conform to POSIX, but you can be certain that
none of the systems CONFINED their functionality ENTIRELY to what
was in the POSIX standard...
Likewise, to the best of my knowledge and belief all the parts of the
compiler I used to compile the code I presented are absolutely conforming
to the ANSI C (90?) standard, except it also contains a whole bunch
of other stuff, including some 99 (?), "special extensions", "even more
special extensions that prove what geniuses we are", and of course, it's
actually a C++ compiler, but a lot of it is actually Pascal, to further
prove
what geniuses they were...
By comparison, just accepting mkdir() as a fact of a "C" programmer's
life is pretty benign, wouldn't you say?
Well, I find reference to a (draft of) the C standard useful sometimes.
Well, as far as later ANSI C standards (99?) are concerned, didn't
they wind up in the trash bin pretty much the day they were printed?
But yeah, I picked one up out of the trash and do look at it occasionally...
Even if the mkdir takes a different number of arguments or they mean
completely different things?
Well, yeah. It's the basic idea that counts, because mkdir() in all cases
takes a file path and makes a directory.
What the hell else are you going to do to make a directory on a system
that uses directories? Squat down like a baby in your own baby poop
and squall endlessly about "IT'S NOT PORTABLE MOMMY!!!", or
just "man up" and change the arguments to mkdir() to match your
system?
If, as you claim in this post it is neither the same as the Unix version
nor the Windows version then very probably it *is* specific to DJPP.
Unfortunately, this nonsense forced me to actually look at what
"DJGPP" actually is, and I almost threw up. Ironic, really, but trust
me, there's NOTHING "specific" about it, and of course, the OP's
problem almost certainly has NOTHING to do with a specific
"DJGPP" problem (if it is, it's most like a "Java problem" where the
program doesn't run right on differing Unix X-window managers
even though they use the same X intrinsics)...
Depends on the version of mkdir being used. Which is one reason why it
is not topical here.
OK, one of the choices was "C" and the OP dude was using a "C" version
of mkdir() (!) so I guess it IS on topic here! Done and done!
Actually, it could sensibly be argued that it is a networking topic and
there are networking groups.
Yes, but you do have to get increasingly granular because as a
"networking topic" it really doesn't have anything to do at all with any
actual networking protocols! It's just a particular low-level software
methodology for sending and receiving data that comes over a network
connection...conceptually, sockets work identically in both Windows
and Unix (Linux et. al.) systems.
If you're going to re-direct, it's actually something like
comp.programming.<system>.networking.sockets,
but most of the time, it's really just a higher-level networking
library implementation question, so the guy is just gonna
get bounced back to a protocol group, then to languages
group, back to the sockets group (which is a dead group
in the first place because there's really nothing to discuss)...
Really, the take-away lesson is that Usenet is only good
for political flame wars and race-baiting, which are ALWAYS
on-topic...
read: "sloooooow-working"?
review the code to find out what areas are standard
"standard" with what? If it's the "ANSI C standard" in the
"anal-restrictive" sense, then generally very little of it is "standard"
and we might as well just start squatting in the baby poop...
and will not need changing and what areas are system specific (even if
specific to a number of systems)
I dunno...I really think it boils down to some type of existing code
and library base where you "work". If you've seen and used mkdir()
before, you know you've got it, you're 90% done already...if not,
you're gonna find out very quickly in any event.
There's also something called "reading the labels on the package"
which is where "standards" are actually useful. If it says "ANSI C"
and "POSIX" on the label, and you know what those are and
what you have, again, you're 90% done already...too bad that
I've met several VPs of Software Development who couldn't handle
that simple task...
and this group will help with that. I
consider questions like, "is such and such standard?" to be topical
here. I also consider the follow up questions of, "well, is there an
alternative that is standard, and if so what is it?" to be topical.
So, the statement, "mkdir() is kind of a standard 'C' function for
making a directory, originally used in Unix" IS topical...whew, what
a relief...
Also, it is possible to write vast amounts of code that is completely
standard C although you often also need a small amount of non-standard
(or different standard) code, and here we deal with that vast quantity
of standard code.
Review carefully any and all of the code I post and note that a
large quantity of it is "standard" by your "restrictive" definition, but
if you want to get REALLY restrictive about it "printf()" isn't REALLY
a part of the "C" programming language, and neither is just about
everything else...
I just wish that more people stuck to standard C where
extensions are not needed, it would make my life a lot easier.
Absolutely, why re-invent the wheel? But if man had "standardized"
the wheel 6,000 years ago, we wouldn't have the "extension" of the
jet engine, and then what would happen to your frequent flyer miles?