dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetC/samples pwd.c,NONE,1.1 Makefile.am,1.1


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetC/samples pwd.c,NONE,1.1 Makefile.am,1.1.1.1,1.2
Date: Mon, 23 Dec 2002 20:21:54 -0500

Update of /cvsroot/dotgnu-pnet/pnetC/samples
In directory subversions:/tmp/cvs-serv21238/samples

Modified Files:
        Makefile.am 
Added Files:
        pwd.c 
Log Message:


Add fake password file access routines (getpwnam, etc); stub out
pthread-style mutexes to assist with building thread-safety into
the rest of the library.


--- NEW FILE ---

/* Dump the contents of the fake password file */

#include <stdio.h>
#include <pwd.h>

int main(int argc, char *argv[])
{
  struct passwd *pw;
  setpwent();
  while((pw = getpwent()) != 0)
    {
      printf("%s:%s:%d:%d:%s:%s:%s\n",
             pw->pw_name, pw->pw_passwd,
             (int)(pw->pw_uid), (int)(pw->pw_gid),
             pw->pw_gecos, pw->pw_dir, pw->pw_shell);
    }
  endpwent();
  return 0;
}

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetC/samples/Makefile.am,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** Makefile.am 16 Aug 2002 03:19:45 -0000      1.1.1.1
--- Makefile.am 24 Dec 2002 01:21:52 -0000      1.2
***************
*** 2,6 ****
  AUTOMAKE_OPTIONS = no-dependencies
  
! noinst_PROGRAMS = hello.exe hello2.exe stack.exe
  
  hello_exe_SOURCES = hello.c
--- 2,6 ----
  AUTOMAKE_OPTIONS = no-dependencies
  
! noinst_PROGRAMS = hello.exe hello2.exe stack.exe pwd.exe
  
  hello_exe_SOURCES = hello.c
***************
*** 12,15 ****
--- 12,18 ----
  stack_exe_SOURCES = stack.c
  stack_exe_LDADD = -L../libc -lOpenSystem.C -llibc$(LIBRARY_SUFFIX)
+ 
+ pwd_exe_SOURCES = pwd.c
+ pwd_exe_LDADD = -L../libc -lOpenSystem.C -llibc$(LIBRARY_SUFFIX)
  
  AM_CFLAGS = -I$(top_srcdir)/include \




reply via email to

[Prev in Thread] Current Thread [Next in Thread]