473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Compile errors: Curses.c...Perl5.8...AIX

In trying to build the Perl Curses module (Curses-1.12)
under Perl 5.8 on a new AIX box I came up against the
limits of my C as well as my Unix knowledge. The thing
had built okay under Perl 5.6 on the old AIX system.
The only co-worker within reach who seems to know more
C than I do had no clue either.

I have put the error messages and excerpt from the
source file in question at
http://cpacker.org/aa.txt

The only thing that looks odd to me in perlio.h on the
error lines is "pTHX_" -- which isn't followed by a comma.
Looking around for what it might be, I see there are these
lines in perl.h in the same directory:

# define pTHX_ pTHX,
which is preceded a few lines back by

# define pTHX register PerlInterpreter *my_perl PERL_UNUSED_DECL
which is REALLY out of my league...

Interpretation welcomed.

--
ma*****@cpacker.org (Charles Packer)
ungoogled: mailboxATSIGNcpacker.org

Nov 15 '05 #1
19 1456
Mac
On Fri, 19 Aug 2005 08:56:10 -0700, mailbox wrote:
In trying to build the Perl Curses module (Curses-1.12)
under Perl 5.8 on a new AIX box I came up against the
limits of my C as well as my Unix knowledge. The thing
had built okay under Perl 5.6 on the old AIX system.
The only co-worker within reach who seems to know more
C than I do had no clue either.

I have put the error messages and excerpt from the
source file in question at
http://cpacker.org/aa.txt

The only thing that looks odd to me in perlio.h on the
error lines is "pTHX_" -- which isn't followed by a comma.
Looking around for what it might be, I see there are these
lines in perl.h in the same directory:

# define pTHX_ pTHX,
which is preceded a few lines back by

# define pTHX register PerlInterpreter *my_perl PERL_UNUSED_DECL
which is REALLY out of my league...

Interpretation welcomed.


This is totally off-topic in comp.lang.c. I don't know about the other
groups because I don't read them.

I am setting followups to c.l.p.m and c.u.a.

--Mac

Nov 15 '05 #2

Mac wrote:
The only thing that looks odd to me in perlio.h on the
error lines is "pTHX_" -- which isn't followed by a comma.
Looking around for what it might be, I see there are these
lines in perl.h in the same directory:

# define pTHX_ pTHX,
which is preceded a few lines back by

# define pTHX register PerlInterpreter *my_perl PERL_UNUSED_DECL
which is REALLY out of my league...

Interpretation welcomed.


This is totally off-topic in comp.lang.c. I don't know about the other

Oh yeah? Please explain.

--
ma*****@cpacker.org (Charles Packer)
ungoogled: mailboxATSIGNcpacker.org

Nov 15 '05 #3
ma*****@cpacker.org wrote:
Mac wrote:
The only thing that looks odd to me in perlio.h on the
error lines is "pTHX_" -- which isn't followed by a comma.
Looking around for what it might be, I see there are these
lines in perl.h in the same directory:

# define pTHX_ pTHX,
which is preceded a few lines back by

# define pTHX register PerlInterpreter *my_perl PERL_UNUSED_DECL
which is REALLY out of my league...

Interpretation welcomed.


This is totally off-topic in comp.lang.c. I don't know about the other


Oh yeah? Please explain.


It shouldn't be here.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson

Nov 15 '05 #4

In article <pa****************************@bar.net>, Mac <fo*@bar.net> writes:
On Fri, 19 Aug 2005 08:56:10 -0700, mailbox wrote:
In trying to build the Perl Curses module (Curses-1.12)
under Perl 5.8 on a new AIX box I came up against the
limits of my C as well as my Unix knowledge.

I have put the error messages and excerpt from the
source file in question at
http://cpacker.org/aa.txt
I'm afraid you did not. There are at least two "source file[s]
in question", and you excerpted only one area with errors from only
one of them.

When an implementation emits several diagnostics, it is often the
case that at least some of the later ones are "cascade errors"
caused by earlier ones. Begin your diagnosis with the *first*
error, not the second-to-last one.
# define pTHX_ pTHX,
which is preceded a few lines back by

# define pTHX register PerlInterpreter *my_perl PERL_UNUSED_DECL
which is REALLY out of my league...

Interpretation welcomed.

C macros that do not use the token-pasting (##) or stringizing (#)
operators perform simple text substitution; unparameterized macros
perform only *literal* text substitution of the macro body for the
macro name. Here it should be obvious that:

pTHX_

becomes

register PerlInterpreter *my_perl PERL_UNUSED_DECL,

Unfortunately, strictly speaking we can't interpret this further
because we don't know what PERL_UNUSED_DECL is. It's likely another
macro name, because the only other thing it could be here is an
identifier, which would be a constraint violation (I think) in this
case.

Aside from PERL_UNUSED_DECL, this appears to be a declaration of the
identifer "my_perl" as a pointer to a PerlInterpreter (probably an
identifier from a previous typedef), and the PerlInterpreter has the
register storage class (which is a bit bizarre and very likely
completely useless on the vast majority of implementations). Actually,
since it's illegal to take the address of an object with register
storage class, a pointer to a register-sc object can't be used to
refer to an object of that type. I don't know what this is meant to
accomplish.
This is totally off-topic in comp.lang.c. I don't know about the other
groups because I don't read them.
I disagree. It's a question about the meaning of certain lines of C
code which do not appear to involve any nonstandard keywords or other
language "extensions", and about the probable meaning of diagnostics
issued by one implementation when compiling that code. The former
seems entirely topical for c.l.c to me, and the latter at least
arguably topical; even if it is implementation-dependant, we do treat
some questions of "typical implementations" here as topical.
I am setting followups to c.l.p.m and c.u.a.


On the other hand, it seems to me completely OT for c.l.p.m, since
it's a question about, at best, part of a specific Perl implementa-
tion, and not the Perl language or programs written in it. Indeed,
it's just the sort of question we regularly boot out of c.l.c for
just that reason.

Nor is it topical for c.u.a, as its only connection to AIX is that
happens to be the platform hosting the C implementation being used.

Followups reset.

--
Michael Wojcik mi************@microfocus.com

Even 300 years later, you should plan it in detail, when it comes to your
summer vacation. -- Pizzicato Five
Nov 15 '05 #5
Michael Wojcik wrote:
In article <pa****************************@bar.net>, Mac <fo*@bar.net> writes:
This is totally off-topic in comp.lang.c. I don't know about the other
groups because I don't read them.


I disagree. It's a question about the meaning of certain lines of C
code which do not appear to involve any nonstandard keywords or other
language "extensions", and about the probable meaning of diagnostics
issued by one implementation when compiling that code. The former
seems entirely topical for c.l.c to me, and the latter at least
arguably topical; even if it is implementation-dependant, we do treat
some questions of "typical implementations" here as topical.
I am setting followups to c.l.p.m and c.u.a.


On the other hand, it seems to me completely OT for c.l.p.m, since
it's a question about, at best, part of a specific Perl implementa-
tion, and not the Perl language or programs written in it. Indeed,
it's just the sort of question we regularly boot out of c.l.c for
just that reason.

Nor is it topical for c.u.a, as its only connection to AIX is that
happens to be the platform hosting the C implementation being used.

Thanks for the analysis of the material I supplied. But why should I
have problems anyway? The Curses package is from CPAN and built okay
under Perl 5.6. There's nothing at the CPAN Web site that suggests that
Curses will not build under Perl 5.8. And from what I know so far,
there should be no reason to question why the Makefile on the new AIX
system shows the default C compiler as cc_r, whereas on our old AIX
system it was cc.

In other words, the problem didn't begin with doubtful C code that I
wrote. The C code was from an established vendor and built and executed
successfully in one environment but wouldn't even build in another. For
me to know in advance what single newsgroup to post in under these
circumstances would have been to know what variables were being
confounded when our sysadmin upgraded to new hardware and
software...and therefore to know the solution to the problem...and not
need to post at all...

--
ma*****@cpacker.org (Charles Packer)
ungoogled: mailboxATSIGNcpacker.org

Nov 15 '05 #6

In article <11**********************@g47g2000cwa.googlegroups .com>, ma*****@cpacker.org writes:

Thanks for the analysis of the material I supplied. But why should I
have problems anyway? The Curses package is from CPAN and built okay
under Perl 5.6.
That, I'm afraid, *is* an off-topic question for comp.lang.c. We have
no relationship to CPAN or Perl or Perl-Curses. You'll have to
address that question to the maintainer of the package.
In other words, the problem didn't begin with doubtful C code that I
wrote.
But that's all we can comment on here.
The C code was from an established vendor and built and executed
successfully in one environment but wouldn't even build in another.
Alas, this is all too common with C source. Many an "established
vendor" cannot write compliant C to save their lives. Your faith
in the code may be ill-founded.
For me to know in advance what single newsgroup to post in under these
circumstances would have been to know what variables were being
confounded when our sysadmin upgraded to new hardware and
software...and therefore to know the solution to the problem...and not
need to post at all...


This argument does not hold water, I'm afraid. There are a great
many examples of on-topic questions posted to newsgroups - and
thus of people who are able to determine where the problem lies,
yet unable to determine what it is, much less how to solve it.

At any rate, I'm unsure what your complaint is. You cross-posted to
various groups, including c.l.c. A few c.l.c participants felt your
query was off-topic and said so; I felt it was not, and responded in
the context of the C language. (Though, as I noted, I might have
been able to be more helpful had you supplied better diagnostic
information on your web page.) All of that seems to me entirely
within normal and accepted Usenet practice.

--
Michael Wojcik mi************@microfocus.com

Against all odds, over a noisy telephone line, tapped by the tax authorities
and the secret police, Alice will happily attempt, with someone she doesn't
trust, whom she can't hear clearly, and who is probably someone else, to
fiddle her tax return and to organise a coup d'etat, while at the same time
minimising the cost of the phone call. -- John Gordon
Nov 15 '05 #7

Michael Wojcik wrote:
In article <11**********************@g47g2000cwa.googlegroups .com>, ma*****@cpacker.org writes:
In other words, the problem didn't begin with doubtful C code that I
wrote.


But that's all we can comment on here.


Oh really? Isn't there a comp.lang.c.moderated
for you strait-jacketed types? Who let you, and
especially Mac and CBFalconer, out of that cage?
It's universally acknowledged that technical
newsgroups are the place to get answers. They may
perhaps come to be populated by a few regulars
who enjoy debating the finer points of issues
that are over the heads -- and beyond the immediate
concerns -- of the rest of us. But the rest of us
know that more often than not these very regulars,
in MOST technical newsgroups, are glad to share
their knowledge. Therefore there is no such thing
as a query, made in good faith, that doesn't BELONG,
no matter how clueless. Let me say it in different
words: There is no such thing as an off-topic
technical query. We're not talking here about rants
about politics or Jesus, for christsake. If participants
in a technical newsgroup don't know the answer to
a query, they are actually free to ignore it, believe
it or not. Let the one who queries learn that it's the
wrong newsgroup by seeing no responses, or a
more helpful "The odds are," -- probabilities
matter here -- "nobody here KNOWS that, because..."

--
ma*****@cpacker.org (Charles Packer)
ungoogled: mailboxATSIGNcpacker.org

Nov 15 '05 #8
ma*****@cpacker.org writes:
Michael Wojcik wrote:
In article <11**********************@g47g2000cwa.googlegroups .com>,
ma*****@cpacker.org writes:
> In other words, the problem didn't begin with doubtful C code that I
> wrote.


But that's all we can comment on here.


Oh really? Isn't there a comp.lang.c.moderated
for you strait-jacketed types? Who let you, and
especially Mac and CBFalconer, out of that cage?
It's universally acknowledged that technical
newsgroups are the place to get answers. They may
perhaps come to be populated by a few regulars
who enjoy debating the finer points of issues
that are over the heads -- and beyond the immediate
concerns -- of the rest of us. But the rest of us
know that more often than not these very regulars,
in MOST technical newsgroups, are glad to share
their knowledge. Therefore there is no such thing
as a query, made in good faith, that doesn't BELONG,
no matter how clueless. Let me say it in different
words: There is no such thing as an off-topic
technical query. We're not talking here about rants
about politics or Jesus, for christsake. If participants
in a technical newsgroup don't know the answer to
a query, they are actually free to ignore it, believe
it or not. Let the one who queries learn that it's the
wrong newsgroup by seeing no responses, or a
more helpful "The odds are," -- probabilities
matter here -- "nobody here KNOWS that, because..."


You are mistaken, sir.

Though I didn't witness it myself, I understand that several years ago
our sibling newsgroup, comp.lang.c++, was nearly destroyed by the
volume of off-topic postings. My participation here in comp.lang.c
leads me to believe that the same thing could easily happen here.

This newsgroup, by general consensus, is for discussion of the C
programming language as defined by the ANSI and ISO standards, and, in
historical context, by K&R and earlier documents. There is no
shortage of things to talk about within those boundaries; even if
off-topic and system-specific discussions are ignored, this is a
high-volume newsgroup. There are plenty of newsgroups for
system-specific issues.

There's no real difference in subject matter between comp.lang.c and
comp.lang.c.moderated. The difference is that clcm has a higher
signal-to-noise ratio, lower volume, and longer latency.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #9
ma*****@cpacker.org wrote:
Oh really? Isn't there a comp.lang.c.moderated
for you strait-jacketed types? Who let you, and
especially Mac and CBFalconer, out of that cage?

This is an easy *plonk*.


Brian
Nov 15 '05 #10
On 22 Aug 2005 13:34:13 -0700, ma*****@cpacker.org wrote:

Michael Wojcik wrote:
In article <11**********************@g47g2000cwa.googlegroups .com>, ma*****@cpacker.org writes:
> In other words, the problem didn't begin with doubtful C code that I
> wrote.
But that's all we can comment on here.


Oh really? Isn't there a comp.lang.c.moderated
for you strait-jacketed types? Who let you, and
especially Mac and CBFalconer, out of that cage?


My, my. And after Michael went out of his way to give you what help he
could by extracting everything that was even close to topical.

There is indeed a comp.lang.c.moderated, and it's subject matter is
the same. The main difference is much less traffic and a much longer
turnaround. Because of the lower traffic, they may even be a bit more
tolerant of off-topic subjects.
It's universally acknowledged that technical
newsgroups are the place to get answers. They may
perhaps come to be populated by a few regulars
who enjoy debating the finer points of issues
that are over the heads -- and beyond the immediate
concerns -- of the rest of us. But the rest of us
know that more often than not these very regulars,
in MOST technical newsgroups, are glad to share
their knowledge. Therefore there is no such thing
as a query, made in good faith, that doesn't BELONG,
no matter how clueless. Let me say it in different
words: There is no such thing as an off-topic
technical query.
OK, sci.geo.mineralogy is a technical newsgroup, and they need some
increase in volume. Post there.
We're not talking here about rants
about politics or Jesus, for christsake. If participants
in a technical newsgroup don't know the answer to
a query, they are actually free to ignore it, believe
it or not. Let the one who queries learn that it's the
wrong newsgroup by seeing no responses, or a
more helpful "The odds are," -- probabilities
matter here -- "nobody here KNOWS that, because..."


The one who queries can also learn it's the wrong newsgroup by being
told "It's the wrong newsgroup."

The expertise available on this newsgroup is impressive by any
standard. However, it is a very busy newsgroup, as you would know if
you had monitored it before posting, and must be rather hard-nosed on
topicality to avoid being completely swamped.
--
Al Balmer
Balmer Consulting
re************************@att.net
Nov 15 '05 #11
ma*****@cpacker.org wrote:
Michael Wojcik wrote:
In article <11**********************@g47g2000cwa.googlegroups .com>, ma*****@cpacker.org writes:
In other words, the problem didn't begin with doubtful C code that I
wrote.
But that's all we can comment on here.


Oh really? Isn't there a comp.lang.c.moderated
for you strait-jacketed types?


No, that is a group for people who want a fully moderated group with all
the delays that introduces.
Who let you, and
especially Mac and CBFalconer, out of that cage?
It's universally acknowledged that technical
newsgroups are the place to get answers.
Yes, but only to the questions that are ON topic.
They may
perhaps come to be populated by a few regulars
who enjoy debating the finer points of issues
that are over the heads -- and beyond the immediate
concerns -- of the rest of us.
Yes, plenty of that goes on. We also get plenty of helpful answers for
people of all levels.
But the rest of us
know that more often than not these very regulars,
in MOST technical newsgroups, are glad to share
their knowledge.
CBFalconer and others DO share their knowledge, and I for one am
grateful for this.
Therefore there is no such thing
as a query, made in good faith, that doesn't BELONG,
no matter how clueless.
Wrong. If it is off topic then it belongs else where in a group
dedicated to whatever the topic of the question is or in one of the
..misc groups if there is nowhere better. We also have comp.programming
which I believe covers a far wider range. Although, of course, you
should check what is on topic their before posting to it.
Let me say it in different
words: There is no such thing as an off-topic
technical query.
So tell me, if I have exactly 100g of C12 and 0.004g of C14 what volume
of O2 do I require at STP to react with all of the carbon leaving no
excess oxygen and what mass of CO2 will this give me? How can I write a
COBOL program to calculate the answer?

That's a technical question, but even you might agree that it is
completely OFF topic even though it mentions C and programming and even
though people here could probably manage to produce a Cobol program that
solved the problem.
We're not talking here about rants
about politics or Jesus, for christsake. If participants
in a technical newsgroup don't know the answer to
a query, they are actually free to ignore it, believe
it or not. Let the one who queries learn that it's the
wrong newsgroup by seeing no responses, or a
more helpful "The odds are," -- probabilities
matter here -- "nobody here KNOWS that, because..."


No, the way for someone to learn that it is the wrong group is for them
TO BE TOLD that it is the wrong group. Or better yet, for them to do the
polite thing and actually INVESTIGATE the group before posting.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
Nov 15 '05 #12
ma*****@cpacker.org wrote:
Michael Wojcik wrote:
ma*****@cpacker.org writes:
In other words, the problem didn't begin with doubtful C code
that I wrote.


But that's all we can comment on here.


Oh really? Isn't there a comp.lang.c.moderated
for you strait-jacketed types? Who let you, and
especially Mac and CBFalconer, out of that cage?
It's universally acknowledged that technical
newsgroups are the place to get answers. They may
perhaps come to be populated by a few regulars
who enjoy debating the finer points of issues
that are over the heads -- and beyond the immediate
concerns -- of the rest of us. But the rest of us
know that more often than not these very regulars,
in MOST technical newsgroups, are glad to share
their knowledge. Therefore there is no such thing
as a query, made in good faith, that doesn't BELONG,
no matter how clueless. Let me say it in different
words: There is no such thing as an off-topic
technical query. We're not talking here about rants
about politics or Jesus, for christsake. If participants
in a technical newsgroup don't know the answer to
a query, they are actually free to ignore it, believe
it or not. Let the one who queries learn that it's the
wrong newsgroup by seeing no responses, or a
more helpful "The odds are," -- probabilities
matter here -- "nobody here KNOWS that, because..."


Obviously you are not interested in discussing the C language,
which is the topic of this newsgroup, but prefer to argue about
topicality. I, for one, will not be noticing you any more. PLONK.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 15 '05 #13

In article <11**********************@g14g2000cwa.googlegroups .com>, ma*****@cpacker.org writes:
Michael Wojcik wrote:
In article <11**********************@g47g2000cwa.googlegroups .com>, ma*****@cpacker.org writes:
In other words, the problem didn't begin with doubtful C code that I
wrote.
But that's all we can comment on here.


Oh really? Isn't there a comp.lang.c.moderated
for you strait-jacketed types?


No, comp.lang.c.moderated is for those who want a moderated newsgroup
in which to discuss C. That's entirely different from maintaining
topicality on a high-volume unmoderated newsgroup. And I'm afraid I
don't own a straitjacket.
Who let you, and especially Mac and CBFalconer, out of that cage?
Insulting the regulars is rarely an ideal way to get help. I must
say that I've really come to regret helping you. It's not a mistake
I'll make again.
It's universally acknowledged that technical
newsgroups are the place to get answers.
It most certainly is not, as anyone even vaguely familiar with Usenet
would know. Technical newsgroups are often a place to get answers to
on-topic questions. Rejecting questions on the grounds of topicality
is a long-standing and widespread practice.

In any event, claiming something is true because it's "universally
acknowledged" is a logical fallacy (a combination of argumentum ad
ignorantiam and converse accident), so this argument holds no water.
Therefore there is no such thing
as a query, made in good faith, that doesn't BELONG,
no matter how clueless.


A fascinating take on topicality. I've never encountered anyone
else who shares it.

--
Michael Wojcik mi************@microfocus.com

Do not "test" parts, as this may compromise sensitive joinery. Those who
suffer difficulty should abandon the enterprise immediately. -- Chris Ware
Nov 15 '05 #14
Mac
On Sat, 20 Aug 2005 19:52:46 +0000, Michael Wojcik wrote:

[snip]
This is totally off-topic in comp.lang.c. I don't know about the
other groups because I don't read them.


I disagree. It's a question about the meaning of certain lines of C
code which do not appear to involve any nonstandard keywords or other
language "extensions", and about the probable meaning of diagnostics
issued by one implementation when compiling that code. The former seems
entirely topical for c.l.c to me, and the latter at least arguably
topical; even if it is implementation-dependant, we do treat some
questions of "typical implementations" here as topical.


Well, build problems are seldom on-topic here. They are usually not
caused by problems with the C-code as such, but by problems with the
build setup. Perhaps I should have made more of an effort to redirect,
(for example, perhaps there is a relevant mailing list out there
somewhere) but I stand by the off-topic-ness in CLC.
I am setting followups to c.l.p.m and c.u.a.


On the other hand, it seems to me completely OT for c.l.p.m, since it's
a question about, at best, part of a specific Perl implementa- tion, and
not the Perl language or programs written in it. Indeed, it's just the
sort of question we regularly boot out of c.l.c for just that reason.

Nor is it topical for c.u.a, as its only connection to AIX is that
happens to be the platform hosting the C implementation being used.


It may well be that the question is off-topic in all three of the chosen
groups. As I said, I don't know because I don't read them.

--Mac

Nov 15 '05 #15
Mac
On Sat, 20 Aug 2005 03:31:16 -0700, mailbox wrote:

Mac wrote:
> The only thing that looks odd to me in perlio.h on the
> error lines is "pTHX_" -- which isn't followed by a comma.
> Looking around for what it might be, I see there are these
> lines in perl.h in the same directory:
>
> # define pTHX_ pTHX,
> which is preceded a few lines back by
>
> # define pTHX register PerlInterpreter *my_perl PERL_UNUSED_DECL
> which is REALLY out of my league...
>
> Interpretation welcomed.


This is totally off-topic in comp.lang.c. I don't know about the other

Oh yeah? Please explain.


I'm sorry, I was rather terse. Read the clc FAQ, or "welcome to CLC" or
something like that. You'll get the picture. Here are URL's:

http://www.eskimo.com/~scs/C-faq/top.html
http://groups-beta.google.com/group/...ebc1119?hl=en&

This newsgroup is for discussion of the C language as defined by the
relevant ANSI or ISO standards. Your question deals with a build problem
for a well known package.

My guess is that you will get much better expert help from people who use
your platform, people who deal with curses, or people who deal with Perl.
There is some possibility that you could find help at
comp.unix.programmer, but check first before posting.

Anyway, good luck with your problem. Build problems can be very
frustrating!

I'm posting to all three groups without setting followups this time since
it now appears likely that the question is not entirely topical in any of
the groups.

--Mac

Nov 15 '05 #16

In article <pa****************************@bar.net>, Mac <fo*@bar.net> writes:
On Sat, 20 Aug 2005 19:52:46 +0000, Michael Wojcik wrote:
It's a question about the meaning of certain lines of C
code which do not appear to involve any nonstandard keywords or other
language "extensions", and about the probable meaning of diagnostics
issued by one implementation when compiling that code.
Well, build problems are seldom on-topic here.


While that may be useful as a heuristic, it doesn't constitute much
of an argument.
They are usually not
caused by problems with the C-code as such, but by problems with the
build setup.


Perhaps (though I wouldn't bet on it). However, my argument was
that the OP's question was not about a build issue, but about certain
apparently-legal C constructs and what they meant. It was presented
in the context of a build issue, but the question about what those
constructs meant was independent of implementation.

That said, of course people can reasonably disagree on what's topical,
and I don't believe we need to agree in this case.

--
Michael Wojcik mi************@microfocus.com

As always, great patience and a clean work area are required for fulfillment
of this diversion, and it should not be attempted if either are compromised.
-- Chris Ware
Nov 15 '05 #17
Mac
On Wed, 24 Aug 2005 15:06:53 +0000, Michael Wojcik wrote:

In article <pa****************************@bar.net>, Mac <fo*@bar.net> writes:
On Sat, 20 Aug 2005 19:52:46 +0000, Michael Wojcik wrote:
> It's a question about the meaning of certain lines of C
> code which do not appear to involve any nonstandard keywords or other
> language "extensions", and about the probable meaning of diagnostics
> issued by one implementation when compiling that code.
Well, build problems are seldom on-topic here.


While that may be useful as a heuristic, it doesn't constitute much
of an argument.


Hmm. I have to agree, considering the way I phrased it.
They are usually not
caused by problems with the C-code as such, but by problems with the
build setup.


Perhaps (though I wouldn't bet on it). However, my argument was
that the OP's question was not about a build issue, but about certain
apparently-legal C constructs and what they meant. It was presented
in the context of a build issue, but the question about what those
constructs meant was independent of implementation.


OK. I accept that. ;-)
That said, of course people can reasonably disagree on what's topical,
and I don't believe we need to agree in this case.


Spoken like a true gentleman.

Best regards,
Mac

Nov 15 '05 #18
On 20 Aug 2005 19:52:46 GMT, mw*****@newsguy.com (Michael Wojcik)
wrote:
<snip>
pTHX_ [is apparently a macro which] becomes

register PerlInterpreter *my_perl PERL_UNUSED_DECL,

Unfortunately, strictly speaking we can't interpret this further
because we don't know what PERL_UNUSED_DECL is. It's likely another
macro name, because the only other thing it could be here is an
identifier, which would be a constraint violation (I think) in this
case.
Actually it's a syntax error. But the required response (diagnostic)
is the same for syntax error or constraint violation.
Aside from PERL_UNUSED_DECL, this appears to be a declaration of the
identifer "my_perl" as a pointer to a PerlInterpreter (probably an
identifier from a previous typedef), and the PerlInterpreter has the
register storage class (which is a bit bizarre and very likely
completely useless on the vast majority of implementations). Actually,
since it's illegal to take the address of an object with register
storage class, a pointer to a register-sc object can't be used to
refer to an object of that type. I don't know what this is meant to
accomplish.


This is rather confused but I think not. _Qualifiers_ (const,
volatile, and C99 restrict) apply where they appear, at different
levels of pointerness or functionosity. _Storage class_ (register,
auto, static, extern, and quasi-SC typedef) apply to the declared
identifier(s), regardless of where (in the s-q-list) it appears.

Barring perverted/ing macros, this declares my_perl as a register
pointer to a PerlInterpreter, which is presumably a typedef as you
say. Whether specifying register is actually helpful (or even harmful)
on many or particular implementations especially modern ones is a
separate issue, but it is at least meaningful.

- David.Thompson1 at worldnet.att.net
Nov 15 '05 #19

In article <ff********************************@4ax.com>, Dave Thompson <da*************@worldnet.att.net> writes:
On 20 Aug 2005 19:52:46 GMT, mw*****@newsguy.com (Michael Wojcik)
wrote:
register PerlInterpreter *my_perl PERL_UNUSED_DECL,

Aside from PERL_UNUSED_DECL, this appears to be a declaration of the
identifer "my_perl" as a pointer to a PerlInterpreter (probably an
identifier from a previous typedef), and the PerlInterpreter has the
register storage class (which is a bit bizarre and very likely
completely useless on the vast majority of implementations)....


This is rather confused but I think not. _Qualifiers_ (const,
volatile, and C99 restrict) apply where they appear, at different
levels of pointerness or functionosity. _Storage class_ (register,
auto, static, extern, and quasi-SC typedef) apply to the declared
identifier(s), regardless of where (in the s-q-list) it appears.


Thanks for the correction, Dave. I thought I must be missing
something - it didn't occur to me that I was treating "register" as
a qualifier rather than as an sc-specifier.

--
Michael Wojcik mi************@microfocus.com
Nov 15 '05 #20

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

Similar topics

1
by: Edmond Ho | last post by:
Hi, I'm having trouble with a small curses program. I'm associate a pad with a panel. As I understand, a pad is supposed to be just a window with an arbitrary size. That seems to imply that a pad...
1
by: Riccardo Galli | last post by:
Hi, I'm writing some widgets in curses. Actually I'm trying to write a combobox. To do so, I need to create a pad inside a panel, so that I can hide/show it. I can't do it. I can create a...
0
by: Matthew Alton | last post by:
The appended program freaks python 2.2 & 2.3 completely out. To reproduce the wierdness: i) copy the source to a file called consarn.py ii) $ python consarn.py; iii) the program is now doing a...
0
by: Matt Garman | last post by:
I'd like to write a class or module in python that allows me to do on-the-fly color changing in the curses module. I'm thinking about something along the lines of this: addstr(y, x, 'hello',...
0
by: ReaprZero | last post by:
Hi, I'm using Cygwin and ActiveState perl to try to compile a sample application using SWIG. I'm using the short tutorial from http://www.swig.org/tutorial.html (the perl part of it), but with a...
9
by: David Bear | last post by:
I need python 2.3. I have freebsd 4.10-releng. when configuring python I received the following: ../configure --prefix=/home/webenv > config-results configure: WARNING: curses.h: present but...
1
by: Jerry Fleming | last post by:
Hi, I have wrote a game with python curses. The problem is that I want to confirm before quitting, while my implementation doesn't seem to work. Anyone can help me? #!/usr/bin/python # #...
7
by: Gasten | last post by:
Hello. The last weeks I've been coding a roguelike (you know, like nethack) in python using the nCurses library. Some week ago I ran into a problem: When I made the object for messagebar-output, I...
5
by: 7stud | last post by:
I can't see to get any y, x coordinates to work with curses. Here is an example: import curses def my_program(screen): while True: ch = screen.getch() if ch == ord("q"): break
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.