/[gcl]/gcl/h/linux.h
ViewVC logotype

Diff of /gcl/h/linux.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by camm, Thu Sep 4 03:09:39 2003 UTC revision 1.9 by camm, Wed Sep 10 19:57:55 2003 UTC
# Line 168  do { int c = 0; \ Line 168  do { int c = 0; \
168     setbuf(stdout,0);     setbuf(stdout,0);
169    
170  #define INIT_CORE_END terminal_io->sm.sm_object0->sm.sm_fp = stdin;terminal_io->sm.sm_object1->sm.sm_fp = stdout;  #define INIT_CORE_END terminal_io->sm.sm_object0->sm.sm_fp = stdin;terminal_io->sm.sm_object1->sm.sm_fp = stdout;
171    
172    #include <limits.h>
173    #include <sys/stat.h>
174    #define GET_FULL_PATH_SELF(a_) do {\
175     char b[20];\
176     static char q[PATH_MAX];\
177     struct stat ss;\
178     if (snprintf(b,sizeof(b),"/proc/%d/exe",getpid())<=0)\
179       error("Cannot write proc exe pathname");\
180     if (stat(b,&ss)) \
181       (a_)=argv[0];\
182     else {\
183       if (!realpath(b,q)) \
184         error("realpath error");\
185       (a_)=q;\
186     }\
187    } while(0)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26