473,386 Members | 1,908 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,386 software developers and data experts.

Re: Building a Copyright statement<4936c2ec-cd3c-44fb-a24a-0a685d195c24@k30g2000hse.googlegroups.com><1c35038 e-1be1-4105-a365-9fc89c2c95ae@l42g2000hsc.googlegroups.com>

On 2008-05-26, James Kanze <ja*********@gmail.comwrote:
>
Visible how? If all you're interested in is that it shows up in
the output of strings, then just including a file with:
static char const copyright[] = "..." ;
should do the trick. You're compiler may even have an option
which will force an include at the start of compilation.
Although some compilers with some optimization settings will drop the
variable from the object file if it's not 'used' elsewhere in the
translation unit. (Being static it can't be used from any other TU.)

--
Charles Bailey
http://ccgi.hashpling.plus.com/blog/
Jun 27 '08 #1
1 1236
On May 26, 1:04 pm, Charles Bailey <usenetspa...@hashpling.orgwrote:
On 2008-05-26, James Kanze <james.ka...@gmail.comwrote:
Visible how? If all you're interested in is that it shows up in
the output of strings, then just including a file with:
static char const copyright[] = "..." ;
should do the trick. You're compiler may even have an option
which will force an include at the start of compilation.
Although some compilers with some optimization settings will
drop the variable from the object file if it's not 'used'
elsewhere in the translation unit. (Being static it can't be
used from any other TU.)
The obvious answer to that is: don't use those compilers, or
don't use them with those settings:-).

In fact, of course, it's a bit more awkward, because if the
variable is a POD with static initialization (as it is here),
then such a modification is quite valid; there's no way the
program can tell. If it becomes an issue, some sort of
work-around using dynamic initialization could be used (but
beware---this will impact on start-up times). Another
alternative would be to make the variable non-static, and hack
the name of the file into the name of the variable, to avoid
duplicate definitions. (Either solution can easily be generated
automatically.)

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #2

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

Similar topics

7
by: Carl Waldbieser | last post by:
I tried to adapt the instructions for building the M2Crypto module (http://sandbox.rulemaker.net/ngps/m2/INSTALL.html) to build a version compatible with Python2.3, but I've had some mixed results....
3
by: DrSarang | last post by:
While building XmlSampleGenerator code from MSDN, I get missing XmlSchemaSet reference. Here is the screen dump, if needed. C:\Documents and Settings\Dr Sarang\My Documents\MSDN\XML Sample...
3
by: ELCO | last post by:
www.electronic-copyright.com invites anyone interested in protecting their intellectual property copyright (including programming code) to visit our website. We assist you in verifying your...
0
by: Vidyasagara Guntaka | last post by:
Hi, I recently downloaded source code for 8.0.0 beta1. When I tried building the libpq for windows, I got some compilation errors. Following the compilation output:...
7
by: Alan T | last post by:
How do I set the text property of label on a form as above ?
0
by: CptDondo | last post by:
I hope someone can shed some light on this. I am working with an arm9 platform. I've been trying to build php4 with extensions enabled, but I am failing miserably. I was able to build ming as a...
6
by: Jobe | last post by:
Dear All, Pushed the wrong button:) So again... Could you please advise if there is a violation of copyright of web- code. Website made by me:
13
by: treble54 | last post by:
I need to build PHP from source with the pdo_ibm extension and I am having an issue with it. Firstly, I am using Visual Studio .NET 2003 and I am building PHP from source through the Visual Studio...
0
by: Charles | last post by:
I'm a novice with C++ programming so please bear with me: I'm in the process of inserting multiline Copyright statements in some C++ code and I have many modules to update. The Copyright...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...

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.