Re: UUIDs generated using ossp-uuid on windows not unique

Поиск
Список
Период
Сортировка
От MUHAMMAD ASIF
Тема Re: UUIDs generated using ossp-uuid on windows not unique
Дата
Msg-id SNT127-W18C42125E5FD719BA514CEFF1F0@phx.gbl
обсуждение исходный текст
Ответы Re: UUIDs generated using ossp-uuid on windows not unique  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>On Tue, Jun 17, 2008 at 11:17 AM, Hiroshi Saito
><z-saito(at)guitar(dot)ocn(dot)ne(dot)jp> wrote:
>> Hi.
>>
>> Please this.
>> http://winpg.jp/~saito/pg_work/OSSP_win32/msvc/
>
>Ahh, a makefile - that makes things somewhat clearer :-)
>
>Thanks - I've updated the build machine so future releases will
>include this fix.
>
>--
>Dave Page
>EnterpriseDB UK: http://www.enterprisedb.com

It seems that link http://winpg.jp/~saito/pg_work/OSSP_win32/msvc/ is no longer available. I am working on uuid-ossp
contribmodule, I want to share my findings with you.Thanks. 
I have downloaded uuid-1.6.2.tar.gz from http://www.ossp.org/pkg/lib/uuid/ . It successfully built with MinGW gcc and
madelibuuid.a, I renamed it to uuid.lib to build uuid-ossp contrib module with visual studio 2005. uuid-ossp give the
followinglinker error with VC2005 i.e. 
  
    Linking...
    Creating library Release\uuid-ossp\uuid-ossp.lib and object Release\uuid-ossp\uuid-ossp.exp
    uuid.lib(uuid_time.o) : error LNK2019: unresolved external symbol ___divdi3 referenced in function
_uuid_time_gettimeofday
    uuid.lib(uuid_time.o) : error LNK2019: unresolved external symbol ___moddi3 referenced in function
_uuid_time_gettimeofday
    uuid.lib(uuid_str.o) : error LNK2019: unresolved external symbol ___umoddi3 referenced in function _fmtint
    uuid.lib(uuid_str.o) : error LNK2019: unresolved external symbol ___udivdi3 referenced in function _fmtint
    .\Release\uuid-ossp\uuid-ossp.dll : fatal error LNK1120: 4 unresolved externals

MinGW libgcc.a contains these symbols and these routines are not implemented in c ( its assembly code to make it fast )
soI extracted _divdi3.o _moddi3.o _umoddi3.o _udivdi3.o (we can add these additional files to uuid.lib to make build
easy)from libgcc.a and link it with uuid-ossp contrib. I have tested generated uuid-ossp contrib it gives the following
resultsthat seems fine i.e. 

    edb=# select uuid_generate_v4();
               uuid_generate_v4
    --------------------------------------
     20ff31ce-77a8-4db6-ac7f-3b55380e46ac
    (1 row)
  
  
    edb=#
    edb=# select uuid_generate_v4()
    edb-# ;
               uuid_generate_v4
    --------------------------------------
     e58c46d5-7161-47ec-8006-f905c6b66a1f
    (1 row)

Any thoughts on this ?.

Best Regards,
Asif Naeem
EnterpriseDB Pakistan: http://www.enterprisedb.com

_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: pending patch: Re: Streaming replication and pg_xlogfile_name()
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Parallel pg_dump for 9.1