Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #168262

Re: Why is glibc not extensive?

From Bart <bc@freeuk.com>
Newsgroups comp.lang.c
Subject Re: Why is glibc not extensive?
Date 2022-11-18 17:04 +0000
Organization Aioe.org NNTP Server
Message-ID <tl8du1$k87$1@gioia.aioe.org> (permalink)
References (2 earlier) <62490c42-3d22-4386-ba2c-09aaf49eb1a5n@googlegroups.com> <tl7fve$2tbg8$1@dont-email.me> <81589145-5348-439c-87d7-e34b85378ae6n@googlegroups.com> <tl7sm7$2uat7$1@dont-email.me> <c9a90f81-5fa8-4157-8901-e7510da1019cn@googlegroups.com>

Show all headers | View raw


On 18/11/2022 12:47, A wrote:
> On Friday, 18 November 2022 at 17:39:58 UTC+5:30, David Brown wrote:
>> On 18/11/2022 11:32, A wrote:
>>>
>>> On Friday, 18 November 2022 at 14:03:00 UTC+5:30, David Brown wrote:
>>>> On 17/11/2022 14:18, A wrote:
>>>>> On Thursday, 17 November 2022 at 18:35:22 UTC+5:30, Bart wrote:
>>>>>> On 17/11/2022 06:31, Amit wrote:
>>>>>>
> 
> 
>> a) Use size_t like the rest of the world.
>>
> 
> This is a problem. If I am not convinced then why should I follow the world? The world can use size_t but I will use long and if the world says that I should be using size_t then I will ignore that.

I use neither long nor size_t when calling `malloc`.

Because I normally use it via an FFI from other languages. The only 
thing I need to know is that its parameter is a 64-bit unsigned type on 
my platforms of interest.

I write that as 'u64', which is an exactly defined type in the language 
I use.

The problem with `long` in C is that the language only specifies that it 
is a signed type of at least 32 bits. It's actual size depends on platform.

So I'd stay clear of it. If I was using C to call malloc, I'd define 
'u64' on top of `unsigned long long`, or on top of `uint64_t`, which I 
know will be that size for all platforms of interest.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why is glibc not extensive? Amit <amitchoudhary0523@gmail.com> - 2022-11-16 22:31 -0800
  Re: Why is glibc not extensive? Bart <bc@freeuk.com> - 2022-11-17 13:05 +0000
    Re: Why is glibc not extensive? A <amit234234234234@gmail.com> - 2022-11-17 05:18 -0800
      Re: Why is glibc not extensive? A <amit234234234234@gmail.com> - 2022-11-17 05:24 -0800
      Re: Why is glibc not extensive? Bart <bc@freeuk.com> - 2022-11-17 13:57 +0000
      Re: Why is glibc not extensive? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-11-17 17:04 +0000
      Re: Why is glibc not extensive? David Brown <david.brown@hesbynett.no> - 2022-11-18 09:32 +0100
        Re: Why is glibc not extensive? A <amit234234234234@gmail.com> - 2022-11-18 02:32 -0800
          Re: Why is glibc not extensive? David Brown <david.brown@hesbynett.no> - 2022-11-18 13:09 +0100
            Re: Why is glibc not extensive? A <amit234234234234@gmail.com> - 2022-11-18 04:47 -0800
              Re: Why is glibc not extensive? David Brown <david.brown@hesbynett.no> - 2022-11-18 13:59 +0100
                Re: Why is glibc not extensive? A <amit234234234234@gmail.com> - 2022-11-18 05:27 -0800
              Re: Why is glibc not extensive? Bart <bc@freeuk.com> - 2022-11-18 17:04 +0000
                Re: Why is glibc not extensive? David Brown <david.brown@hesbynett.no> - 2022-11-21 08:50 +0100
                Bart (Was: Why is glibc not extensive?) gazelle@shell.xmission.com (Kenny McCormack) - 2022-11-21 14:14 +0000
              Re: Why is glibc not extensive? Michael S <already5chosen@yahoo.com> - 2022-11-21 08:10 -0800
                Re: Why is glibc not extensive? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-11-26 09:07 -0800
                Re: Why is glibc not extensive? Michael S <already5chosen@yahoo.com> - 2022-11-26 16:11 -0800
                Re: Why is glibc not extensive? Kaz Kylheku <864-117-4973@kylheku.com> - 2022-11-27 13:05 +0000
                Re: Why is glibc not extensive? scott@slp53.sl.home (Scott Lurndal) - 2022-11-27 16:30 +0000
                Re: Why is glibc not extensive? BGB <cr88192@gmail.com> - 2022-11-27 12:20 -0600
                Re: Why is glibc not extensive? Bart <bc@freeuk.com> - 2022-11-27 21:13 +0000
                Re: Why is glibc not extensive? BGB <cr88192@gmail.com> - 2022-11-27 21:53 -0600
                Re: Why is glibc not extensive? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2022-12-03 01:17 -0800
        Re: Why is glibc not extensive? BGB <cr88192@gmail.com> - 2022-11-23 15:11 -0600
  Re: Why is glibc not extensive? Bonita Montero <Bonita.Montero@gmail.com> - 2022-11-17 19:05 +0100
    Re: Why is glibc not extensive? gazelle@shell.xmission.com (Kenny McCormack) - 2022-11-18 08:09 +0000
      Re: Why is glibc not extensive? BGB <cr88192@gmail.com> - 2022-11-23 13:55 -0600

csiph-web