Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <v3p72o$t16n$1@dont-email.me>
Deutsch   English   Français   Italiano  
<v3p72o$t16n$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mikko <mikko.levanto@iki.fi>
Newsgroups: comp.lang.c
Subject: Re: Writing own source disk
Date: Wed, 5 Jun 2024 11:19:36 +0300
Organization: -
Lines: 30
Message-ID: <v3p72o$t16n$1@dont-email.me>
References: <v3hmha$3banl$1@dont-email.me> <87sexvm1lr.fsf@bsb.me.uk> <v3iu4n$3i607$1@dont-email.me> <87mso2mky5.fsf@bsb.me.uk> <v3k49t$3rdhi$1@dont-email.me> <87h6e91r91.fsf@nosuchdomain.example.com> <87cyox1r5e.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 05 Jun 2024 10:19:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="f59ac17d296a13bc5d3841a994cc1bf4";
	logging-data="951511"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/GO26H7ESoO/GwaQBKUj6L"
User-Agent: Unison/2.2
Cancel-Lock: sha1:rpGlKGrYBbPdw6if45X6sVg6rSA=
Bytes: 2216

On 2024-06-04 00:35:25 +0000, Keith Thompson said:

> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>> bart <bc@freeuk.com> writes:
>> [...]
>>> I assume you can use __FILE__ with #embed? (I can do that with my
>>> version of it).
>> 
>> Yes, but not reliably.
>> 
>> __FILE__ expands to "The presumed name of the current source file (a
>> character string literal)".  That's rather vague.
>> 
>> With gcc and clang, it expands to the file name argument given to the
>> compiler, or to the argument of the #include directive.  The running
>> program may or may not be able to access the source file using that
>> name.  The source file might not even exist when the program runs.
> 
> I was thinking of using __FILE__ to access the source file at run time.
> #embed is of course handled at compile time.  It's very likely, but
> still not quite guaranteed, that `#embed __FILE__` will be able to
> access the source file.

An operating system might refuse to open an already opened file.
There is no good reason to refuse when all accesses are for read-only
but a supid operating system might think otherwise.

-- 
Mikko