Bladeren bron

Merged revisions 11081-11084 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r11081 | marco | 2008-05-25 11:40:28 +0200 (Sun, 25 May 2008) | 2 lines

small fix.
........
r11082 | marco | 2008-05-25 11:45:50 +0200 (Sun, 25 May 2008) | 2 lines

* Little FreeBSD fixes.
........
r11083 | marco | 2008-05-25 11:47:01 +0200 (Sun, 25 May 2008) | 2 lines

* enabled users package for FreeBSD
........
r11084 | marco | 2008-05-25 13:55:18 +0200 (Sun, 25 May 2008) | 2 lines

* small freebsd <-> OS X fix
........

git-svn-id: branches/fixes_2_2@11130 -

marco 17 jaren geleden
bovenliggende
commit
9a8c7ac68c
4 gewijzigde bestanden met toevoegingen van 23 en 11 verwijderingen
  1. 7 4
      packages/Makefile
  2. 1 1
      packages/Makefile.fpc
  3. 14 5
      packages/users/examples/testpass2.pp
  4. 1 1
      packages/users/src/users.pp

+ 7 - 4
packages/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/05/24]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/05/29]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -270,7 +270,7 @@ ifeq ($(FULL_TARGET),i386-os2)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv zlib libpng x11 tcl fpgtk rexx os2units gtk1 imlib
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib
+override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib users
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib
@@ -321,7 +321,7 @@ ifeq ($(FULL_TARGET),m68k-linux)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses unzip zlib oracle dbus odbc postgres sqlite pthreads imagemagick gdbint libpng x11 uuid ldap modplug dts mad  gdbm tcl syslog libcurl opengl cairo gtk1 gtk2  a52 bfd aspell svgalib newt cdrom users  imlib utmp  fpgtk openal lua oggvorbis xforms fftw pcap ggi sdl openssl gnome1 httpd13 httpd20 httpd22 pxlib numlib graph
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib
+override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib users
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo gtk1 gtk2  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl gnome1 httpd13 httpd20 httpd22 pxlib numlib
@@ -378,7 +378,7 @@ ifeq ($(FULL_TARGET),x86_64-linux)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses unzip zlib oracle dbus odbc postgres sqlite pthreads imagemagick gdbint libpng x11 uuid ldap modplug dts mad  gdbm tcl syslog libcurl opengl cairo gtk1 gtk2  a52 bfd aspell svgalib newt cdrom users  imlib utmp  fpgtk openal lua oggvorbis xforms fftw pcap ggi sdl openssl gnome1 httpd13 httpd20 httpd22 pxlib numlib graph
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib
+override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib users
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 override TARGET_DIRS+=hash pasjpeg paszlib fpmkunit fcl-base fcl-db fcl-image fcl-net fcl-passrc fcl-registry fcl-xml fcl-fpcunit fcl-json fcl-process unzip regexpr chm libgd  fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick libpng x11 gdbm tcl syslog libcurl opengl cairo gtk1 gtk2  bfd aspell svgalib imlib utmp  fpgtk xforms fftw pcap ggi openssl gnome1 httpd13 httpd20 httpd22 numlib
@@ -1769,6 +1769,7 @@ TARGET_DIRS_HTTPD20=1
 TARGET_DIRS_HTTPD22=1
 TARGET_DIRS_PXLIB=1
 TARGET_DIRS_NUMLIB=1
+TARGET_DIRS_USERS=1
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 TARGET_DIRS_HASH=1
@@ -2446,6 +2447,7 @@ TARGET_DIRS_HTTPD20=1
 TARGET_DIRS_HTTPD22=1
 TARGET_DIRS_PXLIB=1
 TARGET_DIRS_NUMLIB=1
+TARGET_DIRS_USERS=1
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 TARGET_DIRS_HASH=1
@@ -3290,6 +3292,7 @@ TARGET_DIRS_HTTPD20=1
 TARGET_DIRS_HTTPD22=1
 TARGET_DIRS_PXLIB=1
 TARGET_DIRS_NUMLIB=1
+TARGET_DIRS_USERS=1
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 TARGET_DIRS_HASH=1

+ 1 - 1
packages/Makefile.fpc

@@ -17,7 +17,7 @@ dirs_beos=fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sql
                imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib
 dirs_freebsd=fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick \
                gdbint libpng x11 gdbm tcl syslog libcurl opengl cairo  bfd aspell svgalib \
-               imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib
+               imlib utmp  fpgtk xforms fftw pcap ggi sdl openssl graph gnome1 gtk1 gtk2 httpd13 httpd20 httpd22 pxlib numlib users
 dirs_darwin=fv fcl-web fcl-async ibase mysql ncurses zlib oracle odbc postgres sqlite pthreads imagemagick \
                 libpng x11 gdbm tcl syslog libcurl opengl cairo gtk1 gtk2  bfd aspell svgalib \
                imlib utmp  fpgtk xforms fftw pcap ggi openssl gnome1 httpd13 httpd20 httpd22 numlib

+ 14 - 5
packages/users/examples/testpass2.pp

@@ -1,6 +1,8 @@
 Program TestPass2;
 
-Uses pwd,grp,baseunix;
+Uses pwd,grp,baseunix,sysutils;
+
+{$mode objfpc}{$h+}
 
 Procedure printpchar(fieldname:String;p:pchar);
 
@@ -13,11 +15,16 @@ Begin
     End;
 End;
 
+Procedure printpchar(fieldname,p:string);
+
+Begin
+  printpchar(fieldname,pchar(p));
+End;
+
 Var p : PPasswd;
   supplementary_gids : array[0..99] Of gid_t;
   i,nrgids: cint;
   pgrp: PGroup;
-
 Begin
   p := fpgetpwnam('marcov');
   If assigned(p) Then
@@ -27,15 +34,17 @@ Begin
       writeln('pw_uid:',' ':9,p^.pw_uid);
       writeln('pw_gid:',' ':9,p^.pw_gid);
      {$ifdef BSD}
-      printpchar('pw_change',p^.pw_change);
+      printpchar('pw_change',inttostr(p^.pw_change));
       printpchar('pw_class',p^.pw_class);
      {$endif}
       printpchar('pw_gecos',p^.pw_gecos);
       printpchar('pw_dir',p^.pw_dir);
       printpchar('pw_shell',p^.pw_shell);
      {$ifdef BSD}
-      printpchar('pw_expire',p^.pw_expire);
-      printpchar('pw_fields',p^.pw_fields);
+      printpchar('pw_expire',inttostr(p^.pw_expire));
+      {$ifdef FreeBSD}
+        printpchar('pw_fields',inttostr(p^.pw_fields)); 
+      {$endif}
      {$endif}
     End;
   nrgids := 100;

+ 1 - 1
packages/users/src/users.pp

@@ -2,7 +2,7 @@ unit users;
 
 Interface
 {$mode delphi}
-uses BaseUnix,pwd,grp, {$ifdef Linux} shadow{$endif},SysUtils,Classes;
+uses BaseUnix,pwd,grp, {$ifdef Linux} shadow,{$endif}SysUtils,Classes;
 
 Type
   EUserLookupError = Class(Exception);