Update of /cvsroot/freevo/freevo/runtime/src
In directory sc8-pr-cvs1:/tmp/cvs-serv6055

Modified Files:
        runapp.c 
Log Message:
Remove the check for staticly linked apps since it was broken and we don't
need it any more.


Index: runapp.c
===================================================================
RCS file: /cvsroot/freevo/freevo/runtime/src/runapp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** runapp.c    22 Aug 2003 17:47:58 -0000      1.1
--- runapp.c    10 Nov 2003 01:15:36 -0000      1.2
***************
*** 62,66 ****
    int newprio;
    int got_runtime;
-   int static_linked = 0;
    int use_preloads = 0;         /* Full runtime preloads */
    struct exec exec;
--- 62,65 ----
***************
*** 158,196 ****
      if (strstr (av[ac_idx], "runtime/apps/") != (char *) NULL) {
  
!       /* lets see is this app is staticly linked */
!       /* this check is taken from lddlibc4.c of glibc-2.2.5 */
! 
!       /* First see whether this is really an a.out binary.  */
!       fp = fopen (av[ac_idx], "rb");
!       if (fp == NULL) {
!         LOG ("cannot open `%s'", av[1]);
!         exit (1);
!       }
! 
!       /* Read the program header.  */
!       if (fread (&exec, sizeof exec, 1, fp) < 1) {
!         LOG ("cannot read header from `%s'", av[1]);
!       }
!       /* Test for the magic numbers.  */
!       else if (N_MAGIC (exec) != ZMAGIC && N_MAGIC (exec) != QMAGIC
!          && N_MAGIC (exec) != OMAGIC) {
!         LOG ("Looks like a staticly linked executable");
!         static_linked = 1;
!       }
! 
!       /* We don't need the file open anymore.  */
!       fclose (fp);
! 
!       if(!static_linked) {
!         /* Yes, so the executable to start is the freevo_loader. */
!         newav[newac++] = "./runtime/dll/freevo_loader";
!         use_preloads = 1;
  
!         LOG ("Runtime app, must use preloads"); 
!       }
!       else {
!         /* Just a plain old app. It will be copied to newav[]�below */
!         LOG ("Static app, no preloads"); 
!       }
      } else {
        /* Just a plain old app. It will be copied to newav[]�below */
--- 157,165 ----
      if (strstr (av[ac_idx], "runtime/apps/") != (char *) NULL) {
  
!       /* Yes, so the executable to start is the freevo_loader. */
!       newav[newac++] = "./runtime/dll/freevo_loader";
!       use_preloads = 1;
  
!       LOG ("Runtime app, must use preloads"); 
      } else {
        /* Just a plain old app. It will be copied to newav[]�below */
***************
*** 201,205 ****
    
    /* Check if LD_PRELOAD needs to be set to the full runtime preloads */
!   if (use_preloads && !static_linked) {
      char *pPreloads;
  
--- 170,174 ----
    
    /* Check if LD_PRELOAD needs to be set to the full runtime preloads */
!   if (use_preloads) {
      char *pPreloads;
  




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to