diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-10-12 09:33:38 +0200 | 
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-10-12 09:33:38 +0200 | 
| commit | 597d0f27f53cf152edd1c230def4fd7983ac5919 (patch) | |
| tree | 3f4e215d3287e39ed3e33cdd22cf83e923562706 | |
| parent | 0f1157d7e6cabe0394ffc35a0a58a30507af8ebd (diff) | |
applied Salmi's patch
| -rw-r--r-- | config.mk | 2 | ||||
| -rw-r--r-- | slock.c | 7 | 
2 files changed, 5 insertions, 4 deletions
| @@ -17,7 +17,7 @@ LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 | |||
| 17 | # flags | 17 | # flags | 
| 18 | CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H | 18 | CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H | 
| 19 | LDFLAGS = ${LIBS} | 19 | LDFLAGS = ${LIBS} | 
| 20 | #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" | 20 | #CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" -DHAVE_SHADOW_H | 
| 21 | #LDFLAGS = -g ${LIBS} | 21 | #LDFLAGS = -g ${LIBS} | 
| 22 | 22 | ||
| 23 | # On *BSD remove -DHAVE_SHADOW_H from CFLAGS | 23 | # On *BSD remove -DHAVE_SHADOW_H from CFLAGS | 
| @@ -1,7 +1,7 @@ | |||
| 1 | /* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com> | 1 | /* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com> | 
| 2 | * See LICENSE file for license details. | 2 | * See LICENSE file for license details. | 
| 3 | */ | 3 | */ | 
| 4 | #define _XOPEN_SOURCE | 4 | #define _XOPEN_SOURCE 500 | 
| 5 | 5 | ||
| 6 | #if HAVE_SHADOW_H | 6 | #if HAVE_SHADOW_H | 
| 7 | #include <shadow.h> | 7 | #include <shadow.h> | 
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <pwd.h> | 9 | #include <pwd.h> | 
| 10 | #endif | 10 | #endif | 
| 11 | 11 | ||
| 12 | #include <ctype.h> | ||
| 12 | #include <stdlib.h> | 13 | #include <stdlib.h> | 
| 13 | #include <stdio.h> | 14 | #include <stdio.h> | 
| 14 | #include <string.h> | 15 | #include <string.h> | 
| @@ -22,13 +23,13 @@ int | |||
| 22 | main(int argc, char **argv) { | 23 | main(int argc, char **argv) { | 
| 23 | char curs[] = {0, 0, 0, 0, 0, 0, 0, 0}; | 24 | char curs[] = {0, 0, 0, 0, 0, 0, 0, 0}; | 
| 24 | char buf[32], passwd[256]; | 25 | char buf[32], passwd[256]; | 
| 25 | int num, prev_nitem, screen; | 26 | int num, screen; | 
| 26 | #if HAVE_SHADOW_H | 27 | #if HAVE_SHADOW_H | 
| 27 | struct spwd *sp; | 28 | struct spwd *sp; | 
| 28 | #else | 29 | #else | 
| 29 | struct passwd *pw; | 30 | struct passwd *pw; | 
| 30 | #endif | 31 | #endif | 
| 31 | unsigned int i, len; | 32 | unsigned int len; | 
| 32 | Bool running = True; | 33 | Bool running = True; | 
| 33 | Cursor invisible; | 34 | Cursor invisible; | 
| 34 | Display *dpy; | 35 | Display *dpy; | 
