Data types in samba4

Stefan (metze) Metzmacher metze at samba.org
Fri Jan 16 13:08:38 GMT 2004


Sorry, file is attached now

I call it with

sh convert.sh */*.h */*.c */*/*.h */*/*.c librpc/idl/*.idl build/pidl/*.*

tridge at samba.org wrote:

> Tim,
> 
>  > How about the C99 types intN_t and uintN_t where N is 8,16,32,64(?).
>  > Use configure to declare typedefs for compilers that aren't C99.
> 
> ok, sounds great.
> 
> So, who wants to do the big patch for Samba4 to do this?  Metze, feel
> like doing another big patch? :-)

Tridge,

I have a small converting script, can you check if the translations are
ok, plaese!

I'll commit this on the weekend then,

I maybe first commit my torture patch, to get no conflicts in this patch.

Do you have any outstanding patches, for which I should wait?


-- 
metze

Stefan Metzmacher <metze at samba.org> www.samba.org
-------------- next part --------------
#!/bin/sh
#

for file in $@;do
	cat $file | \
	sed -e 's/\bunsigned int\b/uint_t/g' |\
	sed -e 's/\bunsigned char\b/uint8_t/g' |\
	sed -e 's/\bunsigned short\b/uint16_t/g' |\
	sed -e 's/\bunsigned long long\b/uint64_t/g' |\
	sed -e 's/\bunsigned long\b/uint32_t/g' |\
	sed -e 's/\bunsigned\b/uint_t/g' |\
	sed -e 's/\buint8\b/uint8_t/g' |\
	sed -e 's/\buint16\b/uint16_t/g' |\
	sed -e 's/\buint32\b/uint32_t/g' |\
	sed -e 's/\bint\b/int_t/g' |\
	sed -e 's/\bshort\b/int16_t/g' |\
	sed -e 's/\blong long\b/int64_t/g' |\
	sed -e 's/\blong\b/int32_t/g' |\
	sed -e 's/\bint8\b/int8_t/g' |\
	sed -e 's/\bint16\b/int16_t/g' |\
	sed -e 's/\bint32\b/int32_t/g' \
	> $file.cv
	diff -Npur $file $file.cv
	mv $file.cv $file
done


More information about the samba-technical mailing list