Browse Source

--- Merging r23589 into '.':
U rtl/freebsd/ptypes.inc
--- Merging r23590 into '.':
U packages/gdbint/src/gdbint.pp

# revisions: 23589,23590
deleted corrected entry 25666 Invalid stream operation
r23589 | marco | 2013-02-10 18:51:29 +0100 (Sun, 10 Feb 2013) | 3 lines
Changed paths:
M /trunk/rtl/freebsd/ptypes.inc

* fix for FreeBSD9 compatibility break where sem_t is no longer an opague pointer but a record.
Since it will only waste some stack space, one can the FreeBSD9 structure on all versions.
deleted corrected entry 25666 Invalid stream operation
r23590 | marco | 2013-02-10 21:21:08 +0100 (Sun, 10 Feb 2013) | 4 lines
Changed paths:
M /trunk/packages/gdbint/src/gdbint.pp

* freebsd linking slightly alternate. Link .a's like Linux to avoid conflicts;
some extra linklibs (libgnu, libz) added. The libgnu linking might be
more version dependent.

git-svn-id: branches/fixes_2_6@23594 -

marco 12 years ago
parent
commit
73f9b6668c
2 changed files with 28 additions and 9 deletions
  1. 9 7
      packages/gdbint/src/gdbint.pp
  2. 19 2
      rtl/freebsd/ptypes.inc

+ 9 - 7
packages/gdbint/src/gdbint.pp

@@ -293,16 +293,18 @@ interface
     {$linklib kvm}
   {$endif}
   {$undef NotImplemented}
-  {$LINKLIB gdb}
+  {$LINKLIB libgdb.a}
   {$ifdef GDB_HAS_SIM}
-    {$LINKLIB sim}
+    {$LINKLIB libsim.a}
   {$endif GDB_HAS_SIM}
-  {$LINKLIB bfd}
-  {$LINKLIB readline}
-  {$LINKLIB opcodes}
-  {$LINKLIB history}
-  {$LINKLIB iberty}
+  {$LINKLIB libbfd.a}
+  {$LINKLIB libreadline.a}
+  {$LINKLIB libopcodes.a}
+  {$LINKLIB libhistory.a}
+  {$LINKLIB libiberty.a}
+  {$LINKLIB libgnu.a} // at least 7.4 generates this.
   {$LINKLIB ncurses}
+  {$LINKLIB z} // linked implictely by something on Linux
   {$LINKLIB m}
   {$LINKLIB iberty}
   {$ifndef GDB_DISABLE_INTL}

+ 19 - 2
rtl/freebsd/ptypes.inc

@@ -22,6 +22,8 @@
 {$I ctypes.inc}
 {$packrecords c}
 
+const 
+    SEM_SAFE=255;
 type
 
     dev_t    = cuint32;         { used for device numbers      }
@@ -135,9 +137,24 @@ type
    pthread_key_t        = cint;
    pthread_rwlock_t     = ^pthread_rwlock_t_rec;
    pthread_rwlockattr_t = ^pthread_rwlockattr_t_rec;
+  
+   psem_t = ^sem_t;
+   ppsem_t= ^psem_t;
+   semid_t= pointer;
+   sem_t = record
+       magic   : cuint32;
+       lock    : pthread_mutex_t;
+       gtzero  : pthread_cond_t;
+       count   : cuint32;
+       nwaiters: cuint32;
+       semid   : semid_t;
+       sysse   : cint;
+       entry   : psem_t;
+       backpointer : ppsem_t;
+       spare   : array[0..SEM_SAFE] of char;
+
+    end;
 
-   sem_t_rec		= record end;
-   sem_t                = ^sem_t_rec;
    rlim_t		= int64;
    TRlim		= rlim_t;
   {