| Deutsch English Français Italiano |
|
<87v7s3se15.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Suggested method for returning a string from a C program?
Date: Thu, 20 Mar 2025 12:22:30 -0700
Organization: None to speak of
Lines: 41
Message-ID: <87v7s3se15.fsf@nosuchdomain.example.com>
References: <vrd77d$3nvtf$2@dont-email.me> <868qp1ra5f.fsf@linuxsc.com>
<vrdhok$47cb$2@dont-email.me> <20250319115550.0000676f@yahoo.com>
<vreuj1$1asii$4@dont-email.me> <vreve4$19klp$2@dont-email.me>
<20250319201903.00005452@yahoo.com> <86r02roqdq.fsf@linuxsc.com>
<vrh1br$35029$2@dont-email.me> <LRUCP.2$541.0@fx47.iad>
<vrh71t$3be42$1@dont-email.me> <vrh9vh$3ev9o$1@dont-email.me>
<vrhct4$3frk8$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Thu, 20 Mar 2025 20:22:30 +0100 (CET)
Injection-Info: dont-email.me; posting-host="2f20008cbcfa55ae60494be276e0bfaa";
logging-data="4043012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19XeMnuKiD7ONo4byeJ2y+m"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:MPZBNT8w2FmowXw5C4fVtx1m5r8=
sha1:ufEE+zXjSlUHIzKPQFJGZZz8jBI=
Bytes: 2677
bart <bc@freeuk.com> writes:
[...]
> They're popular everywhere:
>
> typedef uint32_t Uint32; // from SDL2
>
> typedef unsigned int GLuint; // from OpenGL
>
> typedef unsigned int l_uint32; // from Lua
>
> typedef unsigned int mz_uint32; // from MiniZ compression lib
>
> typedef uint32_t stbi__uint32; // from STB image library
>
> typedef uint8_t byte; // from arduino.h
>
> #ifndef UINT32_TYPE // from SQLite3
> # ifdef HAVE_UINT32_T
> # define UINT32_TYPE uint32_t
> # else
> # define UINT32_TYPE unsigned int
> # endif
> #endif
[...]
> So I have to ask, why do think they do that?
Almost certainly because they were originally implemented when
<stdint.h> was not universally available. It took a number of
years after the publication of C99 before it was safe to assume
that published code would never be compiled with a C90 compiler.
In a new open source project starting today, it would make much
more sense to use the <stdint.h> types directly. But removing
the project-specific typedefs now would break existing code that
depends on them.
[...]
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */